How can I Halt a paused script from a script initiated by a script trigger? I need a feature similar to a buttons "Current Script: Halt" option.
Halt actually stops all running scripts. I would think you need ExitScript. After the pause step place an if statement like:
If Get( ScriptResult) = 1
Have the terminating button/script exit with a value and the if statement will evaluate and terminate the waiting script.
I couldn't do it exactly like that. That portion of the program is a big sloppy mess. I could, however, set a global variable and test on that. It will work for me.
Glad you got it worked out.
KylePutzier wrote:I need a feature similar to a buttons "Current Script: Halt" option.
I need a feature similar to a buttons "Current Script: Halt" option.
The "Current Script: Halt" attribute in a button definition halts all currently running scripts when the button is clicked.
Including the Halt Script step at the conclusion of the triggered script will achieve the same thing.
R J Cologon, Ph.D.
FileMaker Certified Developer
Author, FileMaker Pro 10 Bible
NightWing Enterprises, Melbourne, Australia
I usually approach this by splitting the script into two parts, at the point where you want to "halt" the process. Instead of halting the big script in the middle, decide whether to run the second script.
So it changes from a problem of halting a running script (hard) to one of running another script (easy).
Doesn't everyone have a "pause" script?
The only drawback to having the application in a paused state is that it inhibits the menu items preventing the user from using them, so they can't use shortcut keys, etc. You need to provide UI elements which trigger scripts for all the actions that they may need.
Retrieving data ...