Scripting 5.9. Quitting

Usually, the execution of your script ends when the interpreter has executed the last line that is not within a procedure definition. However, you can also explicitly stop the script:

exitScript ( )
  stops the execution of the script in the normal way, i.e. without any messages to the user. Any settings (form) window is removed from the screen (unless Apply was clicked instead of OK).
exitScript: error-message
  stops the execution of the script while sending an error message to the user. You can use the same argument list as with writeInfoLine. Any settings (form) window will stay on the screen.

For an example, see Scripting 6.8. Messages to the user.

### Links to this page

- `exitScript`
- Scripting
- Scripting 5. Language elements reference