PDA

View Full Version : Applescript Goto




MacKid9930
Feb 5, 2009, 03:26 PM
In Visual Basic you can use the goto command to jump to a label later in the code, and jump around. What i want to know is are there and equivalents in applescript? Thanks



lee1210
Feb 5, 2009, 09:53 PM
In Visual Basic you can use the goto command to jump to a label later in the code, and jump around. What i want to know is are there and equivalents in applescript? Thanks

There are control structures like if-then-else that are available for conditional code execution:
http://applescript.wikia.com/wiki/If_Then_Else

There are also subroutines:
http://www.apple.com/applescript/sbrt/index.html

You should be able to use these to handle whatever you'd like to do.

-Lee