Stop Execution

Verb: stopExecution

Stops execution of commands after Stop Execution in the script in which the command is entered, or all that are part of the same context.

Syntax

stopExecution [--current(Boolean)]

Inputs

Script Designer Required AcceptedTypes Description
--current Only current Optional Boolean If enabled, stops the execution of the script in which the Stop Execution command is inserted in only.

Example

Example 1: Running and stopping a script.

logMessage --message "Running..." --type "Info"
logMessage --message "Running..." --type "Info"
logMessage --message "Stop execution" --type "Info"
stopExecution
logMessage --message "Script interrupted" --type "Info"
// The last message is not displayed because the script has been interrupted.

Example 2: Two scripts are used, in which case "firstScript" executes "secondScript" using the Execute Script command; the second one is interrupted and execution returns to the first.

firstScript:

logMessage --message "Running...\r\n" --type "Info"
logMessage --message "Running...\r\n" --type "Info"
executeScript --handleError  --name secondScript
logMessage --message "End." --type "Info"

secondScript:

logMessage --message "Running ..." --type "Info"
logMessage --message "Stop Execution" --type "Info"
stopExecution --current
logMessage --message "Script interrupted." --type "Info"
// The last message is not displayed because the script has been interrupted.