How to stop a script by using a command.

Hi there,

I want to stop the script from running if it cannot find a specific image. For example:

if imagefound (“Blah”) then
Do something
else
Stop the application from running

I am currently using the “PauseScript” command, but this will not work if I run the script via command line.

Cheers,
Shawn

The command you want is:

exit script

Awesome thanks Matt.

Shawn

Or possibly

exit all

depending on what you want, and whether this is in a script that’s called by another script. The “exit script” command is basically equivalent to “return” – it will exit the current script, but continue running in the script that called it. “Exit all” will terminate script execution altogether.