From iMacros
Jump to: navigation, search

Add a value to a variable. You can also substract values by adding a negative value to the variable. If the content of at least one of the variables is not an integer number, the values are concatenated as strings instead. The ADD command supports the built-in variables !VAR0 through !VAR9 and !EXTRACT.

Syntax iMacros Browser IE Plug-in Firefox Chrome

ADD result_var added_value


  • result_var
    One of the four built-in variables !VAR1, !VAR2, !VAR3 or !EXTRACT. After the ADD command this variable will hold the result.
  • added_value
    The value that will be added to result_var


Both values are numeric therefore the result is numeric as well:

SET !VAR1 100 
ADD !VAR1 -20 
=> Content of !VAR1 is 80. 

At least one of the values is a string therefore the result is a string as well:

SET !VAR1 Hello 
ADD !VAR1 <SP>World<SP> 
ADD !VAR1 2010 
=> Content of !VAR1 is Hello World 2010

Data Extraction: Add a value to the internal !EXTRACT variable:


See Also