From iMacros
Jump to: navigation, search

Assigns values to user-defined variables during the replay of a macro or playlist. It does not work with any of the built-in variables.


A list of variable names and their values enclosed in curly brackets ({})

{name_1:value_1, name_2:value_2,name_3:value_3,... }

If values include whitespaces (or tabs, newlines) then please enclose the entire value in double-quotes and use \t for tabs and \n for newlines.




imacros.exe -macro test -vars {LASTNAME:Schaefer,FIRSTNAME:"Peter J"}

Note that the name of the variable must correspond to the variable name used in the macro. The example above will assign the value "Schaefer" to the variable "LASTNAME", and "Peter J" to the variable "FIRSTNAME" when running macro test.iim.

' test.iim
PROMPT "Hi, my name is {{FIRSTNAME}} {{LASTNAME}}"
imacros.exe -macro hello.iim -variables {with_tabs:"a\ttable",with_newline:"new\nline"}

See Also