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.
Syntax
CMDLINE variable_name default_value
Parameters
variable_name
Name of the variable that is to be set. Must be a variable that is changable via the command line, i.e. one of the following:
!TIMEOUT
!LOOP
!DATASOURCE
!VAR1
!VAR2
!VAR3
any dynamically defined variable
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 Enterprise 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.
See Also
SET, !VARDEFAULT, PROMPT
Page URL http://www.iopus.com/imacros/help/cmd_cmdline.htm