Steven1337 Posted February 4, 2010 Posted February 4, 2010 I need to make a script for the people in my office that will ask if they are sure they want to close filemaker 10 when they hit the X at the top right. They keep complaining that somtimes they close it by mistake and it closes down everything without asking them. I tried looking to see if filemaker had a built in option like this but I was not able to find one. So i figured the next best thing would be to create a script.
LaurenKuhlman Posted February 4, 2010 Posted February 4, 2010 (edited) 1. Make a new script like this: Show Custom Dialog [ "Close FileMaker?" ] If [ Get ( LastMessageChoice ) = 2 ] Exit Script [ Result: False ] End If On the show custom dialog, I left the buttons default. 2. Go to File > File Options 3. When closing this file: Perform Script. Choose your new script. This will only work on the LAST window open. Let me know if this works out for you. Lauren's FileMaker Blog Edited February 4, 2010 by Guest
Steven1337 Posted February 4, 2010 Author Posted February 4, 2010 (edited) Im setting it up now but where you have Result: False it keeps telling me it does not recognize the table. I am not sure how you want me to put that in there. I left that empty and the pop comes up fine but the issue is that no matter what button I click everything still closes. Edited February 4, 2010 by Guest
bcooney Posted February 4, 2010 Posted February 4, 2010 (edited) Try, If [ get (lastmessagechoice) = 2 ] Halt Script end if Edited February 4, 2010 by Guest
Steven1337 Posted February 4, 2010 Author Posted February 4, 2010 That works perfect! thanks to both of you lovely ladies :)
LaurenKuhlman Posted February 4, 2010 Posted February 4, 2010 Well thats odd. Next time, try using 0. 0 should also be not true. False should not have been in quotes just for the record. FileMaker deals with it in a different way.
LaurenKuhlman Posted February 10, 2010 Posted February 10, 2010 This works fine in FM10 but I am now trying to get it to work in FM9. Any way to do it without custom menus? Halt Script does not work.
Vaughan Posted February 10, 2010 Posted February 10, 2010 Sending a script result of "false" to stop the window from closing only works in FMP 10.0 (and assumedly later). In FMP 9.0 and earlier if the FileMaker application is quit there is no way to stop the window/database from being closed. The quit event trumps all. If a particular window is closed then custom menus can be used to trap for the command and do something about it. (This works for all windows, not just the last.) There is not a similar option to control the Quit command in custom menus.
RodSierra Posted February 11, 2010 Posted February 11, 2010 Yup, what Vaughan said, only thing that saved me in the past from this was the use of SecureFM, by totally eliminating the window buttons altogether.
Recommended Posts
This topic is 5400 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