LuckyMe Posted September 19, 2002 Posted September 19, 2002 Hi, I am run FMP 5.5 on Windows 2000. I have a button called CLOSE, the script behind this button is to check some validation/mandatory fields, if it found some invalid data, it will prompt the user to correct it, otherwise it will CLOSE the application. But when the user click File>Exit, it will quit the FMP without checking validation/mandatory fields. I asked FMP to execute the CLOSE script if the document is closed by checking off the Perform Script of "When Closing Menu" box from Edit>Preferences>Document. It runs the CLOSE script, but after that it quit FMP without checking the data. Here is some script steps in my CLOSE script ShowMessage: "Invalid Data" Halt Script Like I mentioned above, it shows the message, but it quit FMP even it has HALT script right after ShowMessage. What did I miss here? Thank you
LiveOak Posted September 19, 2002 Posted September 19, 2002 You didn't miss a thing. That is the way FM works. The only ways to prevent the user from exiting FM are to 1) keep the user in a scripted loop with a pause statment between loop and end loop or 2) use a plug-in such as SecureFM to lock out the close box and quit options. -bd
CobaltSky Posted September 19, 2002 Posted September 19, 2002 What you need to do, is to use the sequence: If ["put your data validation check here"] LoopShow Message ["Some data are invalid.
stefangs Posted September 19, 2002 Posted September 19, 2002 this sort of thing works well in runtime solutions, because the close box is gone. instead, you have a quit button with a script that does something like this: If your_conditions_are _not_met Show Message [You must still do this and that before you can quit!] Button 1=Cancel Halt Script Else Quit application EndIf if you are running your solutions within FM, this may not work so well, but perhaps you can get your users to only use the buttons anyway.
LuckyMe Posted September 19, 2002 Author Posted September 19, 2002 Thank you all for your help. Will try it now.
Recommended Posts
This topic is 8105 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now