The "tell me to quit" statement is very useful when you run an applescript as an applet or from the script menu, however when developing or debugging scripts in Script Editor it is very annoying since it quits Script Editor rather than just stopping the execution of the script.
Is it possible from within a script to check what environment it runs in, something like
if environment is applet then tell me to quit else display notification "Done"
How do I exit just the script when it is run in Script Editor? That is, the same result as when you click the stop button in the toolbar.