SET

From iMacros
(Redirected from set)
Jump to: navigation, search

Defines the value of a variable. The SET command supports the built-in variables, pre-defined user variables !VAR0 thru !VAR9, as well as user-defined macro variables.

You can use any variable as input for SET, e. g. SET !VAR1 {{myvariable}} or SET !EXTRACT {{!COL1}}.

Syntax iMacros Browser IE Plug-in Firefox Chrome

SET var value

Parameters

  • value
    The value that will be added to var

Examples

Create a user-defined variable

SET myDelay 10
WAIT SECONDS={{myDelay}}

Set a variable with spaces:

SET !VAR1 Hello<SP>World
=> Content of !VAR1 is "Hello World". 

or:

SET !VAR1 "Hello World"

Use "\" (Backslash) to escape reserved characters like "\" itself inside quoted values:

SET !FOLDER_STOPWATCH "c:\\Temp\\With Spaces"

Set a numerical value

SET !TIMEOUT_PAGE 360
=> The new timeout value is 360 seconds (5 minutes).

Save and restore the value of a built-in variable (iMacros for Firefox and Chrome do not support this for all built-in variables)

SET !VAR1 {{!TIMEOUT_STEP}}
SET !TIMEOUT_STEP 0
.
. (other macro commands)
.
SET !TIMEOUT_STEP {{!VAR1}}

Notes

  1. The ability to create user-defined macro variables with the SET command is available in iMacros Standard/Enterprise 7.50 and later, iMacros for Firefox 7.6.0.2 and later, and current versions of iMacros for Chrome.

See Also

ADD, iimSet