Overview of Variables and Expressions

Variable is a name (symbol) used in macro to stand for a value. An expression is a series of value elements (variables or constants) combined with operators, which yields a new value. The below is an example of the expression in Macro Expert:

%=var_1 + var_2 + 10%

The expression must be enclosed by percentage signs, and use the equal mark to lead. The equal mark could be ignored if the expression does not include the operator, for example, %var_1%, %ar_read[2,3]%. Not all actions support the expression. Once you see the icon in the action dialog, you may use the expression in the parameter field. Clicking the icon will show a dialog for choosing a variable.

Variables play an important role in Macro Expert because they enable you to create flexible macros. You can use variables to represent the data rather than entering data directly into the macro. Then, when the macro is played, the variables are replaced with real data. This makes it possible for the same macro to process different sets of data. For example, you might want to use the action "Mouse Move" for placing the mouse pointer at a position, and the position should be determined when the macro is played. You can use the variable to represent the coordinates value of the position. Depending on the value of variable, the mouse pointer will be placed at the different position.

For further information, please follow the below topics: