The percentage sign (%) is used as a special character. Its most commonly seen use is to denote variables (%MyVar%), however its role is much more versatile, and it is crucial to understand.

To put it simply, everything that is contained within percentage signs will be "calculated" as a value; otherwise, it will be treated as text.


In this context, variable names within percentage signs will be replaced by their values. Note that multiple variables may be included between two percentage signs; adding more than two percentage signs will cause a syntax error.




Multiple variables, numbers etc. can be part of a single calculation:


In some cases, however, the percentage sign should be used as a simple character, and not to denote a calculation. In those cases, the percent sign should be escaped, using the backslash (\).



Special care should be taken in some cases, for example when using variables within file paths:


The above will fail, because the first percentage sign will be escaped by the backslash.
To avoid this, we must escape the backslash itself:


In this way, the backslash will be considered an ordinary character, and the variable will be used correctly.

Keep in mind that some actions which have URL fields will automatically escape the percentage sign when they detect a URL, in order to facilitate user input.


Therefore, if you need to use a variable in a URL, it is best to assign the entire URL to a new variable beforehand, and enter that as input instead.



In case you want to pass a number in WinAutomation as a Text type variable instead of Numerical type, you need to use the following configuration:


If you need to remove one or more characters from a text type variable, you need to use the %""% representation in the 'Replace Text' action