Script Command: label


(Contents)(Previous)(Next)

Format:

label LABEL_NAME;

The label command lets you break a script file into sections (or blocks). You can use labels to isolate one block of the script file from another. You can use the goto command to transfer execution to a particular block of the script file. You can have as many labels as you need in a script file. The label name must be all UPPERCASE characters.

Every script file must have at least one label. No commands other than include, define, or comments can appear before the first label. All commands after a given label belong to its block until the next label command.

Example:

// Comments are OK before a label

#include "master.inc" // This is OK as well

label START; // First label, we can now use other commands

send "HELLO"; // Part of START block

send "WORLD"; // Part of START block

label LOGIN; // Next label

send "FIRST NAME"; // Part of LOGIN block


(Contents)(Previous)(Next)