Matt Klein Posted May 19, 2006 Posted May 19, 2006 I am looking to pass the Pause state as a script parameter. Any ideas on how to tell if the current window is paused?
Fitch Posted May 19, 2006 Posted May 19, 2006 That doesn't make any sense: when a script is paused, it's not going to continue on to the next script step until it's un-paused. So by definition such a function would always return a zero. And a paused script affects the whole application; while one window is paused, nothing can happen in any other windows. What exactly are you trying to do?
Matt Klein Posted May 19, 2006 Author Posted May 19, 2006 Here's the situation...In a script, I bring up a new window and pause it. On the layout in this window there are buttons that perform scripts and Resume the current script. Under normal circumstances, the close window("X") button in the upper right of the window is inactive when a script is paused so the user cannot close the window by clicking the "X". However, with FileMaker 8 you can use the Custom Menus function to run a script when a window is closed by setting the Action property in the Menu Item Properties of the "Close" menu item in the File Menu to Perform Script. With this in place, the "X" is no longer inactive when a script is paused. Instead, the script associated with the Close menu item runs. I have a "Close_Window" script that runs whenever someone closes a window. This script checks the current context and either closes the window or doesn't close the window. I would like to pass, as a parameter, the pause state of the window to the "Close_Window" script so that I can put a condition in the script that doesn't close the window if the script running in the window is paused.
Fitch Posted May 22, 2006 Posted May 22, 2006 You could set the status before you pause: use a global variable, or name the window something distinctive and test for that. You could also experiment with Get(ScriptName) but I haven't tested it.
Matt Klein Posted May 23, 2006 Author Posted May 23, 2006 Thanks Fitch. I am going to mess around with setting a global variable prior to pausing.
Recommended Posts
This topic is 6761 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