I made an app that runs a repeating script when a button is clicked (the script is manipulating text and using system events to paste parts of the text into other windows and applications).
I need to make a button that will cancel the aforementioned script.
I made a button and used:
on clicked theObject if the name of theObject is "startButton" then --run the repeating script else if the name of theObject is "cancelButton" then exit repeat end if end clicked
I tried this after doing a search for this topic earlier and finding the “exit repeat” bit.
How can I make this work?