Jump to content

Get Pause State?


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

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5677 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
 Share

×
×
  • Create New...

Important Information

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