-playlist

From iMacros
Jump to: navigation, search

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:

  1. A list of macro names and the number of times each macro should be repeated/looped, enclosed in curly brackets ({})
  2. -playlist {"macro_name_or_path1":r1,"macro_name_or_path2":r2,...}
    
  3. 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.
  4. -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.)

See Also

Playlist, -variables