iMacros Commands Reference
This page lists all available iMacros commands. Each command has either zero or more parameters. If parameters can be omitted, they are enclosed by square brackets. If several choices are possible for the same parameter, they appear in brackets and are seperated by the | character. Integer numbers are denoted by the letters n or m, all other name denote a series of characters (strings). For Scripting Interface commands please look here.
The ' character indicates a comment. If a line starts with ' everything behind the ' is ignored. Typically this is used for comments or to disable specific parts of a macro.
Note: A macro cannot have empty lines, as an empty line indicates the end of the macro. So every line in the macro must have at least the comment symbol.
ADD result_var added_value
Adds a value to a variable.
Opens the previously visited webpage.
Clears browser cache and cookies on the harddrive.
CLICK X=n Y=m [CONTENT=some_content]
"Clicks" on the element at the specified X/Y coordinates.
CMDLINE variable default_value
Sets the variable to a value retrieved from the command line.
Disconnects the current dial-up connection.
EXTRACT POS=[R]n TYPE=(TXT|HREF|TITLE|ALT) ATTR=Anchor*
Extracts data from websites.
Deletes a file.
FILTER TYPE=IMAGES STATUS=(ON|OFF)
Filters web site elements. Currently the support for filtering is experimental. If you need any other data filtered, please let us know what kind of filter you would like to see added.
Directs all following TAG or EXTRACT commands to the specified frame.
IMAGECLICK IMAGE=image_file CONFIDENCE=n [CONTENT=some_content]
Sends a WINCLICK command to the specified image.
IMAGESEARCH IMAGE=image_file CONFIDENCE=n
Searches for the the input image specified via the IMAGE attribute.
Selects the client side certificate from a dialog.
ONDIALOG POS=n BUTTON=(YES|NO|CANCEL) [CONTENT=some_content]
ONDOWNLOAD FOLDER=folder_name FILE=file_name
Handles download dialogs.
ONERRORDIALOG BUTTON=(YES|NO) CONTINUE=(YES|NO)
Handles error dialogs.
ONLOGIN USER=username PASSWORD=password
Handles login dialogs.
ONSECURITYDIALOG BUTTON=(YES|NO) CONTINUE=(YES|NO)
Handles security dialogs.
Handles web page dialogs.
Prints the current browser window.
PROMPT prompt_text variable_name [default_value]
Displays a popup to ask for a value. This value is stored in the variable.
PROXY ADDRESS=proxy_URL:port [BYPASS=page_name]
Connects to a proxy server to run the current macro.
Redials a connection.
Refreshes (Reloads) current browser window.
SAVEAS TYPE=(CPL|MHT|HTM|TXT|EXTRACT|BMP) FOLDER=folder_name FILE=file_name
Saves information to a file.
SET variable_name variable_value
Assigns values to built-in variables.
SIZE X=n Y=m
Resizes the iMacros Browser Window.
Measures time between two STOPWATCH commands.
Sets focus on the tab with number n.
TAG POS=n TYPE=type [FORM=form] ATTR=attr [CONTENT=some_content]
Selects a webpage element.
Navigates to a URL in the currently active tab.
Specifies the version of iMacros that created this macro.
Waits for a specific time.
WINCLICK X=n Y=n [CONTENT=some_content]
Sends standard mouse clicks within the browser window to the specified coordinates [PRO and SCRIPTING Editions only].
Add a value to a variable. You can also substract values by adding a negative value to the variable. If the content of at least one of the variables is not numeric, the values are concatenated as strings instead. The ADD command supports the built-in variables !VAR1, !VAR2, !VAR3 and !EXTRACT.
ADD result_var added_value
One of the four built-in variables !VAR1, !VAR2, !VAR3 or !EXTRACT. After the ADD command, this variable will hold the result.
The value that will be added to result_var
Both values are numeric, therefore the result is numeric as well:
SET !VAR1 100 ADD !VAR1 -20
=> Content of !VAR1 is 80.
At least one of the values is a string, therefore the result is a string as well:
SET !VAR1 Hello ADD !VAR1 <SP>World<SP> ADD !VAR1 2010
=> Content of !VAR1 is Hello World 2010