Exit and Stop Commands

In Internal Scripts

Both exit and stop commands will exit the current internal script:

Exit #1
Stop #1,#2,...

The Exit command exits the script and will close the scripting panel (unless the script had previously provided output with write commands). If Exit command provides the optional #1 argument, however, that argument will be output to the scripting panel and the window will remain open for the user to see that output.

For Stop, any number of optional arguments will be combined (separated by commas) and appear with "script stopped" in the scripting panel. The panel will remain open for the user to see the error messages. This command is helpful when debugging internal scripts because it allows multiple arguments and displays line in the script where it stopped. It is considered to be an abnormal exit to the script.

In Templates

When writing templates, only Exit is supported and it takes no parameters:

Exit

The current template will end. Note that remaining data will be processed as for any template that finishes with unprocessed data. You can alter that behavior with a HideExcess command before the Exit command (since 3.4/1.0).