I'm trying to make a program that repeats a group of actions over and over again. I want the program to end either if the program has repeated a certain number of times or if a certain key is pressed (specifically the escape key). Is there an easy way to do this? If so, what? If not, what would the complicated way be? What I want to be done: repeat x times or until esc pressed action end repeat What would the coding for this look like in AppleScript?