Skip to main content
Known Participant
September 2, 2008
Question

How to exit the script?

  • September 2, 2008
  • 2 replies
  • 4332 views
How do I terminate the script - not Adobe application(s)?
exit(), quit()... - they don't work.

The only workaround I can think of is a main() function with "returns" in appropriate places, but I am just curious if there is a terminating command.

moniuch
This topic has been closed for replies.

2 replies

moniuchAuthor
Known Participant
September 2, 2008
Yep, JS, forgot to mention.
Thanks for confirmation, I was afraid I RTFM with dusted eyeglasses ;-)
try67
Community Expert
Community Expert
September 2, 2008
If you're talking about a JavaScript then there's no command to exit the script. You can use the workaround you mentioned.

Edit: Deleted the alternative method that was here earlier... it's not really very good.
Known Participant
September 7, 2012

Bumbing!

Is there stil now way to exit Javascript as the workaround in question does not work in my scenerio!


// Clint

Inspiring
September 7, 2012

Don't shoot me Clint… but a word of advise… When scripting AI it is better to wrap your syntax in a function and call it… Bonus of this is return inside a function will stop it…