Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to terminate scripts early?

One simple question: is there a simple statement that lets you stop script execution early, like "exit repeat" but for scripts? I've tried "tell me to quit" and "quit me" to no avail.

Thanks!

12 Powerbook G4 1Ghz, Mac OS X (10.4.7)

Posted on Dec 16, 2006 1:03 AM

Reply
Question marked as Best reply

Posted on Dec 16, 2006 3:04 AM

Hi Ryan,

In stay open app, use 'quit'. in any other script use 'return'. This won't work from a subroutine, because it will just return from the subroutine. In that case, cause a user canceled error with 'error number -128' which is the same as pressing the Cancel button in a dialog or Command + ".".

gl,
2 replies
Question marked as Best reply

Dec 16, 2006 3:04 AM in response to Ryan Ballantyne

Hi Ryan,

In stay open app, use 'quit'. in any other script use 'return'. This won't work from a subroutine, because it will just return from the subroutine. In that case, cause a user canceled error with 'error number -128' which is the same as pressing the Cancel button in a dialog or Command + ".".

gl,

How to terminate scripts early?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.