wowpedia
Main Menu


UI Tech. Details

Some macro commands, usually those performing protected actions, can have their arguments specified using the secure command options syntax. This allows a limited range of information, expressed using macro conditionals, to be used to automate decision making. For example, you can create a macro to cast a heal if your current target is friendly, or a nuke if your current target is hostile.

Secure command options can also be used by addons, including within the RestrictedEnvironment, and by the SecureStateDriver API.

Syntax

A secure command options string consists of one or more clauses delimited by semicolons. Each clause consists of zero or more conditions (if no conditions are specified, the clause is considered to have a single, empty condition), and an arbitrary string value, which may not contain the []; characters. Each condition, enclosed in square brackets, contains zero or more macro conditionals, separated by commas. A condition is considered satisfied if all of its conditionals are satisfied; [], containing no conditionals, is always considered satisfied. Conditions are evaluated in order, stopping at the first satisfied condition, returning the associated clause value and the conditional target (if specified in the condition). If no conditions are satisfied, no value is returned when evaluating the options string.

The interpretation of the returned clause value and condition target depends on the context in which the secure command options are used -- different macro commands may interpret the clause value and conditional target differently, or ignore one or both.

Below are some examples of macro commands using secure command options:

See also