Define

Reference:        Script Editor Program
                        Alphabetical Command List

                        Topical Command List 

Open Syntax Window

The Define command allows you to create new commands that may be used in the script.  Defined commands are resolved at Compile time. 

MoveParametersName

Optional Parameters allow you to use meaningful names within the define itself.  Otherwise, up to 10 parameters may be indicated within the body of the defined command using the percent “%“ escape character followed by a number from 0 to 9.  This is similar to the manner in which BAT file parameters operate. 

All Define commands must be terminated with an End_Define command.  You may use any command within a define, including other defined commands.  The only restriction is that the Define command itself may not appear within a defined command.

A defined command is used simply by including it within colons and providing values for the parameters within the body of the define.  Parameters are separated by commas.  When the script compiler encounters a command, it first searches its list of predefined commands and processes a match accordingly.  If the command it not in the predefined list, it next searches the list of defined commands.  If the command is found, it processes the body of the define as if it were inserted in the script at that point.  The compiler replaces any parameters with the values provided from the parameter list.  When the defined command is exhausted, the compiler continues processing the script with the next command.