Command Reference

From iMacros
Jump to: navigation, search

A high-level overview on the different versions of iMacros can be found here


Note: With iMacros Version 8 we adapted our iMacros Edition names and license structure to better suit the needs of our growing numbers of enterprise customers.

Old: iMacros Scripting Edition => New: iMacros Enterprise Edition

Old: iMacros PRO Edition => New: iMacros Standard Edition

We will update the naming in the wiki over time. With regards to Scripting API features, the new Enterprise Edition has all the features of the previous Scripting Edition and is 100% compatible to all existing iMacros 7 scripts.


The browser icons iMacros Browser IE Plug-in Firefox Chrome listed below and on each command detail page denote browser compatibility. Commands that are supported in all browsers work exactly the same in each browser, so macros created in the iMacros Browser (or Internet Explorer) can be replayed in iMacros for Firefox and vice versa. Browser specific differences are automatically handled by iMacros.

iMacros Commands Reference

iMacros Browser IE Plug-in Firefox Chrome ' (Comment)
iMacros Browser IE Plug-in Firefox Chrome ADD
iMacros Browser IE Plug-in Firefox Chrome BACK
iMacros Browser IE Plug-in Firefox Chrome CLEAR
Firefox CLICK
iMacros Browser IE Plug-in DS
iMacros Browser IE Plug-in Firefox Chrome EVAL
EXTRACT (Now part of the TAG command
iMacros Browser IE Plug-in Firefox FILEDELETE
iMacros Browser Firefox FILTER
iMacros Browser IE Plug-in Firefox Chrome FRAME
iMacros Browser IE Plug-in IMAGECLICK
iMacros Browser IE Plug-in IMAGESEARCH
iMacros Browser IE Plug-in ONCERTIFICATEDIALOG
iMacros Browser IE Plug-in Firefox ONDIALOG
iMacros Browser IE Plug-in Firefox ONDOWNLOAD
iMacros Browser IE Plug-in Firefox Chrome ONERRORDIALOG
iMacros Browser IE Plug-in Firefox Chrome ONLOGIN
iMacros Browser IE Plug-in ONPRINT
iMacros Browser IE Plug-in ONSECURITYDIALOG
iMacros Browser IE Plug-in ONWEBPAGEDIALOG
iMacros Browser IE Plug-in Firefox Chrome PAUSE
iMacros Browser IE Plug-in PRINT
iMacros Browser IE Plug-in Firefox Chrome PROMPT
iMacros Browser IE Plug-in Firefox Chrome PROXY
iMacros Browser IE Plug-in Firefox Chrome REFRESH
iMacros Browser IE Plug-in Firefox Chrome SAVEAS
iMacros Browser IE Plug-in Firefox SAVEITEM
iMacros Browser IE Plug-in SCREENSHOT
iMacros Browser IE Plug-in Firefox SEARCH
iMacros Browser IE Plug-in Firefox Chrome SET
iMacros Browser IE Plug-in SIZE
iMacros Browser IE Plug-in Firefox Chrome STOPWATCH
iMacros Browser IE Plug-in Firefox Chrome TAB
iMacros Browser IE Plug-in Firefox Chrome TAG
iMacros Browser TRAY version 7 and later
iMacros Browser IE Plug-in Firefox Chrome URL
iMacros Browser IE Plug-in Firefox Chrome VERSION
iMacros Browser IE Plug-in Firefox Chrome WAIT
Error Codes
Tip: How to make if/then decisions with iMacros.

Built-In Variables

Built-in variable names always start with an exclamation mark ("!"). See also this iMacros variable types overview.

iMacros Browser IE Plug-in Firefox Chrome !CLIPBOARD
iMacros Browser IE Plug-in Firefox Chrome !COLn
iMacros Browser IE Plug-in Firefox Chrome !DATASOURCE
iMacros Browser IE Plug-in Firefox Chrome !DATASOURCE_COLUMNS
Firefox !DATASOURCE_DELIMITER
iMacros Browser IE Plug-in Firefox Chrome !DATASOURCE_LINE
iMacros Browser IE Plug-in Firefox Chrome !ENCRYPTION
iMacros Browser IE Plug-in !ENDOFPAGE
iMacros Browser IE Plug-in Firefox Chrome !ERRORIGNORE
iMacros Browser IE Plug-in Firefox Chrome !EXTRACT
iMacros Browser IE Plug-in Firefox Chrome !EXTRACT_TEST_POPUP
iMacros Browser IE Plug-in !EXTRACTDIALOG
iMacros Browser IE Plug-in !FAIL_ON_ALL_NAVIGATEERRORS
iMacros Browser IE Plug-in !FILELOG
iMacros Browser IE Plug-in Firefox Chrome !FILESTOPWATCH
iMacros Browser IE Plug-in Firefox Chrome !FILE_PROFILER
iMacros Browser IE Plug-in Firefox !FOLDER_DATASOURCE
iMacros Browser IE Plug-in Firefox !FOLDER_STOPWATCH
iMacros Browser IE Plug-in !IMAGEX
iMacros Browser IE Plug-in !IMAGEY
iMacros Browser IE Plug-in Firefox Chrome !LOOP
iMacros Browser IE Plug-in !MARKOBJECT
iMacros Browser IE Plug-in Firefox Chrome !NOW
Firefox !POPUP_ALLOWED
iMacros Browser IE Plug-in Firefox Chrome !REPLAYSPEED
iMacros Browser IE Plug-in !REGION_BOTTOM
iMacros Browser IE Plug-in !REGION_LEFT
iMacros Browser IE Plug-in !REGION_RIGHT
iMacros Browser IE Plug-in !REGION_TOP
iMacros Browser IE Plug-in Firefox !SINGLESTEP
iMacros Browser IE Plug-in Firefox Chrome !STOPWATCHTIME
iMacros Browser IE Plug-in !STOPWATCH_HEADER
iMacros Browser IE Plug-in !TAGSOURCEINDEX
iMacros Browser IE Plug-in !TAGX
iMacros Browser IE Plug-in !TAGY
iMacros Browser IE Plug-in Firefox Chrome !TIMEOUT
iMacros Browser IE Plug-in Firefox Chrome !TIMEOUT_MACRO
iMacros Browser IE Plug-in Firefox Chrome !TIMEOUT_PAGE
iMacros Browser IE Plug-in Firefox Chrome !TIMEOUT_STEP
iMacros Browser IE Plug-in Firefox Chrome !URLCURRENT
iMacros Browser IE Plug-in Firefox !USERAGENT
iMacros Browser IE Plug-in Firefox Chrome !VAR0...!VAR9
iMacros Browser IE Plug-in !WAITPAGECOMPLETE

User-defined Variables

User-defined variables are created with the SET and iimSet commands. Use iimSet to pass variables from script code to a macro. See also this iMacros variable types overview.

Scripting Interface Command Overview

The Scripting Interface is part of the iMacros EnterpriseEditon and works with the iMacros Browser, Internet Explorer and Firefox (see iimOpen for details on how to switch between the browsers).

  1. iimOpen (old: iimInit())
  2. iimDisplay
  3. iimGetInterfaceVersion()
  4. iimGetErrorText (old: iimGetLastError())
  5. iimGetExtract (old: iimGetLastExtract())
  6. iimPlay and iimPlayCode()
  7. iimSet
  8. iimTakeBrowserScreenshot
  9. iimGetStopwatch (Old: iimGetLastPerformance)
  10. iimGetPerformance (new method!)
  11. iimClose (old: iimExit)
  12. Error handling: Scripting Interface Return Codes

Note that we made some API enhancements and name changes in iMacros V7.4. All old commands are still 100% supported, there is no need to change existing scripts and programs.

Command Line Switches

The command line interface is part of the iMacros Browser (iMacros.exe) and the iMacros Sidebar for IE (iMacros.Sidebar.exe) in the Standard and Enterprise Editons.

  1. -delay
  2. -key
  3. -kioskmode
  4. -loop
  5. -macro
  6. -noexit
  7. -silent
  8. -tray
  9. -profiler
  10. -var_varname

In addition to the switches above, the following switches can be used with the iMacros Sidebar for IE:

  1. -timeout
  2. -iePrivate

Error Handling

iMacros includes detailed error handling.

iMacros Error Codes

Please see the list of general iMacros Error-Codes.

Scripting Interface Error Codes

Even a web browser crash or freeze does not stop the Scripting Interface. Instead, it will simply return an error code and you can start a new instance. Please see the list of Scripting Interface Return Codes.

Component for .NET

For details on the new iMacros Component for .NET, please the Component wiki page.