Cancel a paused script
I have a script which goes to a data entry layout where there are global fields for data entry. The script uses a Pause/Resume (Indefinitely) to wait for user input.
The data entry layout has 2 buttons. The first is a "Done" button which does a Pause Resume which restarts the Paused script to allow it to carry on. Works fine.
The second button is "Cancel". What do I do to get the Paused script to restart with a check to see if the "Cancel" button was pressed? The "Cancel" button could do a Halt Script, but I understand this to be a potentially dangerous practice, to be avoided.