I've created an AppleScript loop that automates a repetitive task. It prompts for the amount of times to loop, and then does its thing.
However, I've been asked for a way to exit the loop, if for example someone accidentally inputs a number too large.
Is there a way the user can exit a loop with a keyboard command?
on run {input, parameters}
repeat input times
tell application "AvidMediaComposer" to activate
tell application "System Events"
key code 29 using command down
delay 0.2
key code 124
delay 0.2
key code 39
end tell
end repeat end run
Continue?
dialog every x number of loops?