The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "SET"
(→Notes) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Defines the value of a variable. The SET command supports the [[Command_Reference#Built-In_Variables|built-in variables]], pre-defined user variables [[!VAR0]] thru [[!VAR9]], as well as user-defined macro variables | + | Defines the value of a variable. The SET command supports the [[Command_Reference#Built-In_Variables|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 <nowiki>{{myvariable}}</nowiki>'' or ''SET !EXTRACT {{[[!COLn|!COL1]]}}''. | You can use '''any''' variable as ''input'' for SET, e. g. ''SET !VAR1 <nowiki>{{myvariable}}</nowiki>'' or ''SET !EXTRACT {{[[!COLn|!COL1]]}}''. | ||
Line 16: | Line 16: | ||
===Examples=== | ===Examples=== | ||
− | Create a user-defined variable | + | Create a user-defined variable |
SET myDelay 10 | SET myDelay 10 | ||
Line 39: | Line 39: | ||
=> The new timeout value is 360 seconds (5 minutes). | => The new timeout value is 360 seconds (5 minutes). | ||
− | Save and restore the value of a [[Command_Reference#Built-In_Variables|built-in variable]] | + | Save and restore the value of a [[Command_Reference#Built-In_Variables|built-in variable]] (iMacros for Firefox and Chrome do not support this for all built-in variables) |
SET !VAR1 <nowiki>{{!TIMEOUT_STEP}}</nowiki> | SET !VAR1 <nowiki>{{!TIMEOUT_STEP}}</nowiki> | ||
Line 50: | Line 50: | ||
===Notes=== | ===Notes=== | ||
− | # The ability to create user-defined macro variables with the SET command is available in iMacros 7.50 and later. | + | # 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=== | ===See Also=== | ||
[[ADD]], [[iimSet]] | [[ADD]], [[iimSet]] |
Revision as of 16:43, 8 December 2016
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
SET var value
Parameters
- var
- A built-in variable name, or !VAR0 thru !VAR9, or a user-defined variable name
- 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
- 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.