Help files

% and \% Notation

In WinAutomation, the % sign is used as brackets around a Variable's name. For example, "%myAge%" is the Variable named 'myAge'. When you use %myAge% as an input, the Action will use the value that has previously been stored in that Variable. This means that an earlier Action must have assigned a value to %myAge% as an output. By assigning output values to Variables, and then using them as input in later steps, you can pass information through a WinAutomation Process.

All Variables are cleared at the end of a Process, so Variables can only run from one Process to another if they run at the same time (see External Variables).

There are three special situations to this notation.

  1. The first is that if you want to use the percent sign as a percent sign, special notation is needed so as not to call a Variable. Therefore, write a backslash first to denote 'this is not a Variable'. Thus, if you want to display the text "5%", you should write "5\%" instead.

  2. If you want to access a file named by a Variable, you might write "C:\folder\%filename%". This won't work, as "\%" means it isn't a Variable. Therefore, in this special case, you would need to write, "C:\folder\\%filename%", as the double backslashes mean the Variable is a Variable. Just remember:

    • %filename% is the Variable 'filename'

    • \%filename is the text %filename

    • C:\folder\\%filename% is the path to a file named in the Variable 'filename' in the folder C:\folder\

  3. Finally, the “%” sign is also used to indicate an empty string, using the following syntax: %""%