I am trying to make an Applescript code that uses variables to stop a repeat loop, and I keep getting an error that the variable "result" is not defined. Here is my code:
I keep getting this error:
Thanks, I really appreciate it!
Code Block applescript set x to 0 display dialog "test" buttons {"Ok"} repeat 4 times if result = {button returned:"Ok"} then set x to x + 1 display dialog "test" buttons {"Ok"} if x = 4 then display dialog "test successful" exit repeat end if end if end repeat
I keep getting this error:
Can someone explain to me why this keeps happening?The variable result is not defined.
Thanks, I really appreciate it!