Have your script toggle the value of a global variable each time it is run. Use the value in the variable to determine whether or not to pause the script.
If [ Note $$Resume ]
Set Variable [$$Resume ; Value: Not $$Resume ]
And make sure to select the "resume" button option when selecting this as the script to be performed.
There isn't any way to check the status of another script that I know of. What exactly are you trying to do with this combination of buttons and scripts? Perhaps there is an alternative approach that can be used.
What I attempting is a Play/ Pause Button like on a smartphone!
the button will have a "play icon" when script inactive and when pressed the "pause icon" will appear indicating the script is running.
I'm using it to go through the horizontal portal project I'm building.
The reason I'm asking about the status is if the script gets stopped on the FM toolbar the button will not show correct status nor will the variable be correct.
Yes but what are all of these scripts supposed to do when they run besides the pause/resume? What is being "played"? What is the "other script" that should be exited if this script is paused?
One possible trick: Halt Script when used as a step in a script will both halt the current script and also halt all other scripts.
Will investigate the Halt Script as I never used before.
Just out of interest I have a timer in my script, Is it possible to directly set a field to count down or up? I could then build a funky progress bar with GraphicsMagick
Will post a screen capture of the script when I tidy it up as its very messy
A general description of what you want to accomplish would be good.
Install OnTimerScript could be set on a window to periodically update a field to produce a field that counts up. And a second use of Install OnTimerScript with no parameters specified can be used to "clear" a timer so that it stops executing every x seconds.
And while it's a bit of a challenge, I have been able to use Install OnTimerScript with a 1 second interval as a way to detect an iOS phone's orientation and select the layout appropriate for the portrait or landscape orientation that is current at the moment...