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 "-playlist"
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Specifies the [[Playlist]] to be played in this browser session. The argument can be either the path to a JSON file or a playlist in the format | Specifies the [[Playlist]] to be played in this browser session. The argument can be either the path to a JSON file or a playlist in the format | ||
− | {"macro_name_or_path1": | + | {"macro_name_or_path1":r1,"macro_name_or_path2":r2,...} |
− | If variables are passed on the command line, they will be set for each macro on the playlist, but only if using the command line argument [[-variables]] (or [[-variables|-vars]] | + | where macro_name_or_path is the name/path to the macro file, and r is the number of times to repeat/loop the macro. |
+ | |||
+ | If variables are passed on the command line, they will be set for each macro on the playlist, but only if using the command line argument [[-variables]] (or [[-variables|-vars]], but not [[-var_varname]]). | ||
=== Value === | === Value === | ||
− | + | It is possible to specify two types of values: | |
− | + | <ol> | |
+ | <li>A list of macro names and the number of times each macro should be repeated/looped, enclosed in curly brackets ({})</li> | ||
− | + | -playlist {"macro_name_or_path1":r1,"macro_name_or_path2":r2,...} | |
+ | |||
+ | <li>The relative or absolute path to a JSON playlist file (see the examples below for the format of the JSON file). The iMacros Macros folder (as specified in the iMacros settings) is used as the root path if an absolute path is not specified.</li> | ||
+ | |||
+ | -playlist playlist_name.json | ||
+ | |||
+ | </ol> | ||
=== Aliases === | === Aliases === | ||
-p | -p | ||
+ | |||
+ | === Notes === | ||
+ | * Use the [[-variables]] or [[-variables|-vars]] command line argument to pass variable values to all of the macros. The same set of variables will be passed to each macro specified in the playlist. | ||
+ | |||
=== Examples === | === Examples === | ||
− | ==== | + | ==== JSON file ==== |
imacros.exe -playlist logNsearch.json | imacros.exe -playlist logNsearch.json | ||
− | The user's macro folder contains a file logNsearch.json with | + | or |
+ | |||
+ | -playlist "C:\Web Projects\Daily Reports\playlist.json" | ||
+ | |||
+ | The user's macro folder contains a file logNsearch.json with the following content that instructs iMacros to play the login.iim macro once, then repeat the search.iim macro 10 times, and finally play logout.iim once. | ||
[ | [ | ||
Line 38: | Line 55: | ||
} | } | ||
] | ] | ||
− | |||
− | |||
− | |||
==== Directly on the command line ==== | ==== Directly on the command line ==== | ||
Line 46: | Line 60: | ||
imacros.exe -playlist {"Demo\FillForm.iim":1,"Demo\TagPosition.iim":3} | imacros.exe -playlist {"Demo\FillForm.iim":1,"Demo\TagPosition.iim":3} | ||
− | to play Demo\FillForm.iim once and | + | to play Demo\FillForm.iim once and followed by looping Demo\TagPosition.iim 3 times. |
==== With variables ==== | ==== With variables ==== | ||
− | imacros.exe -variables={first:1.0, second:"2,2", third:"three"} | + | imacros.exe -variables={first:1.0, second:"2,2", third:"three"} -playlist={"macro1.iim":11,"macro2":12} |
− | the variables ''first'', ''second'', and ''third'' will be properly set for both macro1.iim and macro2.iim in all the loops (11 and 12, respectively.) | + | the variables ''first'', ''second'', and ''third'' will be properly set for both macro1.iim and macro2.iim in all the loops (11 and 12 times, respectively.) |
=== See Also === | === See Also === | ||
[[Playlist]], [[-variables]] | [[Playlist]], [[-variables]] |
Latest revision as of 12:53, 8 March 2020
Specifies the Playlist to be played in this browser session. The argument can be either the path to a JSON file or a playlist in the format
{"macro_name_or_path1":r1,"macro_name_or_path2":r2,...}
where macro_name_or_path is the name/path to the macro file, and r is the number of times to repeat/loop the macro.
If variables are passed on the command line, they will be set for each macro on the playlist, but only if using the command line argument -variables (or -vars, but not -var_varname).
Value
It is possible to specify two types of values:
- A list of macro names and the number of times each macro should be repeated/looped, enclosed in curly brackets ({}) -playlist {"macro_name_or_path1":r1,"macro_name_or_path2":r2,...}
- The relative or absolute path to a JSON playlist file (see the examples below for the format of the JSON file). The iMacros Macros folder (as specified in the iMacros settings) is used as the root path if an absolute path is not specified. -playlist playlist_name.json
Aliases
-p
Notes
- Use the -variables or -vars command line argument to pass variable values to all of the macros. The same set of variables will be passed to each macro specified in the playlist.
Examples
JSON file
imacros.exe -playlist logNsearch.json
or
-playlist "C:\Web Projects\Daily Reports\playlist.json"
The user's macro folder contains a file logNsearch.json with the following content that instructs iMacros to play the login.iim macro once, then repeat the search.iim macro 10 times, and finally play logout.iim once.
[ { "macro": "login.iim", "loop": 1 }, { "macro": "search.iim", "loop": 10 }, { "macro": "logout.iim", "loop": 1 } ]
Directly on the command line
imacros.exe -playlist {"Demo\FillForm.iim":1,"Demo\TagPosition.iim":3}
to play Demo\FillForm.iim once and followed by looping Demo\TagPosition.iim 3 times.
With variables
imacros.exe -variables={first:1.0, second:"2,2", third:"three"} -playlist={"macro1.iim":11,"macro2":12}
the variables first, second, and third will be properly set for both macro1.iim and macro2.iim in all the loops (11 and 12 times, respectively.)