Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5400 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted (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 by Guest
Posted (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 by Guest
Posted (edited)

Try,

If [ get (lastmessagechoice) = 2 ]

Halt Script

end if

Edited by Guest
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.