Macros

Macros are used to execute one or more TCL commands and are stored in the master dictionary with the name of the macro as the item-ID.

When the macro name is entered at TCL, it can be followed with any number of parameters. These parameters are added to the end of the first TCL command in attribute 2 as additional language elements and then passed for processing.

The macro functionality is provided for a simple TCL procedure language. In general, a complex procedure should be written as a FlashBASIC program.

The first line of a macro must contain the character m (modify mode) or n (nonstop mode). Each subsequent line is considered a TCL command to be executed.

If the m code is used in the first attribute of the macro, the TCL command displays so that changes can be made to the TCL command. If n is used, the macro runs immediately.

macro comments can be added, preceded by a space after the macro code on attribute 1. Comments on following lines can be added by using the rem statement.

Additional values stored in an attribute are used as stacked input to the TCL command in the first value.

Macros can be created by using the Update processor or the create-macro command. The create-macro command takes the last statement entered at TCL and converts it to a macro.

Warning: An m-type macro must be enclosed in quotation marks when being edited or accessed through the Update processor.