MuonDude Posted October 30, 2006 Posted October 30, 2006 I have a solution I am binding as a runtime (both WinXX and MacOSX). On the layout there is currently a "Quit" button which runs a shutdown script. I tried setting the "File Option" to run the shutdown script when closing the main file. In the Developer only layout I have a script to close all the solution files (not exiting FileMaker). The shutdown script is run for several reasons, one being it backups the solution. Here is my problem/question: By setting the "File Option" to run the shutdown script on close, my old "close all files" script triggers the full shutdown script, running the backup and exiting FileMaker. Is there a way to modify the runtime quit behavior with out setting the File Option? I looked at Custom Menus but didn't see anyway to modify the default Quit behavior (I see I can add my own Quit command but then there are 2 quit commands, mine and the runtime default!). If I don't set the native "Quit" behavior then the user can quit the runtime without the shutdown script being run, which is not what I want. TIA.
Mike D. Posted October 31, 2006 Posted October 31, 2006 What I have done in one of my solutions is to have the shutdown script use the Get(ApplicationVersion) to see if the first word is "Runtime". If it is, then quit the runtime. Otherwise allow the user select if they want to close the solution or quit FileMaker altogether.
MuonDude Posted November 2, 2006 Author Posted November 2, 2006 What I have done in one of my solutions is to have the shutdown script use the Get(ApplicationVersion) to see if the first word is "Runtime". If it is, then quit the runtime. Otherwise allow the user select if they want to close the solution or quit FileMaker altogether. thanks Mike. What I want is the following (may not be very clear above) I want the "Quit" button on the layout and the runtime Application Quit button to have the same functionality. I couldn't find a way to attach the runtime Quit button (exit under WinXX) to a script execpt with the "File Options". The problem with the "File Options" is that I also want to have a Developer Only ([Full Access] PS) script that just closes all the files and leaves FileMaker running. But the "File Option" script gets triggered by the File closing, thereby linking these two functions - which is not what I want.
Mike D. Posted November 2, 2006 Posted November 2, 2006 Sam, I think I understand what you're trying to do. Before you create the runtime, attach a script similar to this to your exit/quit button. If [ LeftWords ( Get ( ApplicationVersion ); 1) = "Runtime" ] Exit Application Else Show Custom Dialog [ Title: "Exit"; Message: "Do you want to Exit FileMaker too?"; Buttons: “Yes”, “No”, “Cancel” ] If [ Get ( LastMessageChoice ) = 1 ] Exit Application End If If [ Get ( LastMessageChoice ) = 2 ] Close File [ Current File ] End If End If Hopefully, if this is not exactly what you need, it will give you some ideas. Mike
Recommended Posts
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