CMDLINE
(Copy URL in PhpBB Forum Format - Info)From iMacros
Sets a variable to a value retrieved from the command line. The most common use for this command is to read user input from the command line at runtime. It can also be used to assign a default value to a variable in case no value is set by the command line.
Contents |
Syntax 
CMDLINE variable_name default_value
Parameters
- variable_name
- Name of the variable that is to be set. Must be a variable that is changeable via the command line, i.e. one of the following:
- default_value
- Default value variable is assigned if no value is given
Examples
Consider the following macro called macro1.iim:
CMDLINE !VAR1 abc.csv
PROMPT Enter<SP>file<SP>name !VAR2 {{!VAR1}}
Starting this macro from the command line with (PRO Version and Scripting Edition only):
imacros.exe -macro macro1 -var1 efg.csv
would result in !VAR2 having the value efg.csv, while
imacros.exe -macro macro1
would result in !VAR2 having the value abc.csv.
