I have several nested loops in an Applescript, but I need a simple way for the user to stop executing the entire script. A (rather inefficient) idea I had was to check if keys were pressed within the quickest loop, and pass error number -128 in a keypress event, but I can't find a way to detect what keys were pressed. I've seen recommendations for Jon's Commands, but I can't seem to install it properly even though it's in my ApplicationScripts -- (keys pressed) doesn't work. Alternately, is there a better way to stop running the script across multiple loops?
Try using command . to stop the script
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With