|
Control statements allow evaluating a sequence of shortcuts when condition is true and
evaluating a different sequence of shortcuts when condition is not true. You can
evaluate the value of the LastErrorCode and LastExitCode variables.
LastErrorCode is the code of the error of the last command execution (0 means
command executed successfully). LastExitCode is the code returned by the command
(for example, Kill Process command returns number of killed processes).
IF
The IF statement is one of the most useful control structures. It enables you to evaluate
a sequence of commands if a condition is true and evaluate a different sequence of
commands if it is not true.
ELSEIF
The ELSEIF statement enables you to evaluate a sequence of commands if a condition
is true and evaluate a different sequence of commands if it is not true.
ELSE
The ELSE enables you to evaluate a sequence of commands if none of the IF or
ELSEIF conditions are true. Note: There is a maximum of one ELSE per IF statement.
ENDIF
The ENDIF statement finishes the IF..ELSEIF..ELSE sequence.
DELAY
The DELAY statement suspends execution of the task for a specified time period.
|