Documentation

Variables

What variables are#

Variables hold values that routines and monitors share. Create them on the Global Variables tab: type a Name, pick a Type, enter a Starting value, and click Add / Update.

  • Boolean: true or false.
  • Integer: a whole number.
  • Decimal: a number with a decimal point (use a dot: 2.5).
  • Text: any text.

Names use letters, numbers and _ and must not start with a number. A variable must exist before a command or monitor can use it.

The Global Variables tab. The form on the right adds or changes a variable.
The Global Variables tab. The form on the right adds or changes a variable.

The list shows each variable's current value, starting value, what changed it last, and when. Reset all (or Run > Reset variables to starting values) puts every variable back to its starting value. Only starting values are saved with the project.

Using variables in commands#

  • {Name} inside text is replaced by the variable's value. This works in Type Text, Log Message, Alert messages, Send Keys to Window text, Set Variable on Text variables, window names, and file paths.
  • @Name in a value box means "the value of this variable", for example in a condition's Compare to box or as a mouse X.

Maths#

Number boxes for positions (mouse X/Y, window positions), Set Variable on number variables, and Random Number Min/Max accept maths.

  • Operators: + - * / % (remainder) ^ (power) and brackets ( ).
  • Write {Name} for a variable.
  • Functions: abs, round, floor, ceil, sqrt, min, max, and random(1, 10).

Example: {Health} * 2 + 5

Boxes for times and counts (such as Delay's Time or Press Key's Times) take a plain whole number.

Conditions and comparisons#

Conditions are used by If, Else If, Loop (While/Until) and Wait Until.

  • Comparisons: == (equal), != (not equal), >, >=, <, <=, contains, not contains.
  • Text is compared ignoring upper and lower case. contains and not contains also ignore case.
  • Number variables are compared as numbers. Boolean variables are compared with true or false (yes/no, on/off and 1/0 also work).
  • Compare with another variable by typing @Name.
  • Second condition: AND (both must be true) or OR (either one).

If a condition uses a variable that does not exist, it counts as false and a warning is logged.