Command Reference

From iMacros
Jump to navigation Jump to search

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

  • iMacros Browser iMacros Browser
  • Chrome Chrome
  • Firefox Firefox
  • iMacros Classic Browser iMacros Classic Browser (iMacros 12.6 and older)

The browser icons denote browser compatibility. Commands that are supported in multiple browsers typically work the same, with any browser-specific differences noted on the command's reference page.

iMacros Commands Reference

iMacros Browser Chrome Firefox iMacros Classic Browser ' (Comment)
iMacros Browser Chrome Firefox iMacros Classic Browser ADD
iMacros Browser Chrome Firefox iMacros Classic Browser BACK
iMacros Browser Chrome Firefox iMacros Classic Browser CLEAR
Firefox CLICK
iMacros Browser iMacros Classic Browser DISPLAY
iMacros Browser iMacros Classic Browser DS
iMacros Browser Chrome Firefox iMacros Classic Browser EVAL
iMacros Browser Chrome iMacros Classic Browser EVENT
iMacros Browser iMacros Classic Browser FILEDELETE
iMacros Classic Browser FILTER
iMacros Browser iMacros Classic Browser FORWARD (version 12.6 and above)
iMacros Browser Chrome Firefox iMacros Classic Browser FRAME
iMacros Browser iMacros Classic Browser IMAGECLICK
iMacros Browser Chrome Firefox iMacros Classic Browser IMAGESEARCH
iMacros Browser iMacros Classic Browser ONCERTIFICATEDIALOG
iMacros Browser iMacros Classic Browser ONDIALOG
iMacros Browser Chrome Firefox iMacros Classic Browser ONDOWNLOAD
iMacros Classic Browser Chrome Firefox ONERRORDIALOG
iMacros Classic Browser ONINSECURECONNECTION
iMacros Browser Chrome Firefox iMacros Classic Browser ONLOGIN
iMacros Classic Browser ONPRINT
iMacros Classic Browser ONSECURITYDIALOG
iMacros Classic Browser ONWEBPAGEDIALOG
iMacros Browser Chrome Firefox iMacros Classic Browser PAUSE
iMacros Classic Browser PRINT
iMacros Browser PRINTPDF
iMacros Browser Chrome Firefox iMacros Classic Browser PROMPT
iMacros Browser Chrome iMacros Classic Browser PROXY
iMacros Browser Chrome Firefox iMacros Classic Browser REFRESH
iMacros Browser Chrome Firefox iMacros Classic Browser SAVEAS
iMacros Browser Chrome Firefox iMacros Classic Browser SAVEITEM
iMacros Browser Chrome Firefox iMacros Classic Browser SCREENSHOT
iMacros Browser Chrome Firefox iMacros Classic Browser SEARCH
iMacros Browser Chrome Firefox iMacros Classic Browser SET
iMacros Browser Chrome Firefox iMacros Classic Browser SIZE
iMacros Browser Chrome Firefox iMacros Classic Browser STOPWATCH
iMacros Browser Chrome Firefox iMacros Classic Browser TAB
iMacros Browser Chrome Firefox iMacros Classic Browser TAG
iMacros Classic Browser TRAY
iMacros Browser Chrome Firefox iMacros Classic Browser URL
iMacros Browser Chrome Firefox iMacros Classic Browser VERSION
iMacros Browser Chrome Firefox iMacros Classic Browser 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 Chrome Firefox iMacros Classic Browser !CLIPBOARD
iMacros Browser Chrome Firefox iMacros Classic Browser !COLn
iMacros Browser Chrome Firefox iMacros Classic Browser !DATASOURCE
iMacros Browser Chrome Firefox !DATASOURCE_COLUMNS
Chrome Firefox iMacros Classic Browser !DATASOURCE_DELIMITER
iMacros Browser Chrome Firefox iMacros Classic Browser !DATASOURCE_LINE
iMacros Browser Chrome Firefox iMacros Classic Browser !DOWNLOADED_FILE_NAME
iMacros Browser Chrome iMacros Classic Browser !DOWNLOADED_SIZE
iMacros Browser Chrome Firefox iMacros Classic Browser !ENCRYPTION
iMacros Classic Browser !ENDOFPAGE
iMacros Browser Chrome Firefox iMacros Classic Browser !ERRORIGNORE
iMacros Browser Chrome Firefox iMacros Classic Browser !EXTRACT
iMacros Browser Chrome Firefox iMacros Classic Browser !EXTRACT_TEST_POPUP
iMacros Browser iMacros Classic Browser !EXTRACTDIALOG
iMacros Browser iMacros Classic Browser !FAIL_ON_ALL_NAVIGATEERRORS
iMacros Browser iMacros Classic Browser !FILELOG
iMacros Classic Browser Chrome Firefox !FILESTOPWATCH
iMacros Classic Browser Chrome Firefox !FILE_PROFILER
iMacros Browser Chrome Firefox iMacros Classic Browser !FOLDER_DATASOURCE
iMacros Browser Chrome Firefox iMacros Classic Browser !FOLDER_DOWNLOAD
iMacros Browser iMacros Classic Browser !FOLDER_LOG
iMacros Classic Browser Chrome Firefox !FOLDER_MACROS
iMacros Classic Browser Chrome Firefox !FOLDER_STOPWATCH
iMacros Classic Browser !HTTP_ERRORCODE Versions 11.5 to 12.6
iMacros Browser Chrome Firefox iMacros Classic Browser !IMAGEX
iMacros Browser Chrome Firefox iMacros Classic Browser !IMAGEY
iMacros Browser !IGNORE_ELEMENTNOTFOUND
iMacros Browser !IGNORE_TIMEOUT
iMacros Browser !IRTIME
iMacros Browser !LOG_EXTRACTED_DATA
iMacros Browser Chrome Firefox iMacros Classic Browser !LOOP
iMacros Classic Browser !MARKOBJECT
iMacros Browser Chrome Firefox iMacros Classic Browser !NOW
iMacros Browser Chrome Firefox iMacros Classic Browser !PLAYBACKDELAY
Firefox !POPUP_ALLOWED
iMacros Browser Chrome Firefox iMacros Classic Browser !REPLAYSPEED
iMacros Classic Browser !REGION_BOTTOM
iMacros Classic Browser !REGION_LEFT
iMacros Classic Browser !REGION_RIGHT
iMacros Classic Browser !REGION_TOP
iMacros Browser iMacros Classic Browser !SINGLESTEP
iMacros Browser Chrome Firefox iMacros Classic Browser !STOPWATCHTIME
iMacros Browser iMacros Classic Browser !STOPWATCH_HEADER
iMacros Classic Browser !TAGSOURCEINDEX
iMacros Browser iMacros Classic Browser !TAGX
iMacros Browser iMacros Classic Browser !TAGY
iMacros Browser Chrome Firefox iMacros Classic Browser !TIMEOUT
iMacros Browser Chrome Firefox iMacros Classic Browser !TIMEOUT_DOWNLOAD
iMacros Browser Chrome Firefox iMacros Classic Browser !TIMEOUT_MACRO
iMacros Browser Chrome Firefox iMacros Classic Browser !TIMEOUT_PAGE
iMacros Browser Chrome Firefox iMacros Classic Browser !TIMEOUT_STEP
iMacros Browser Chrome Firefox iMacros Classic Browser !URLCURRENT
iMacros Classic Browser !USE_DOWNLOADMANAGER Version 10.3 to 12.6
iMacros Classic Browser Chrome Firefox !USERAGENT
iMacros Classic Browser Chrome Firefox !VAR0...!VAR9
iMacros Classic Browser !WAITPAGECOMPLETE
iMacros Browser iMacros Classic Browser !WINDOW_TITLE Version 11.5 to 12.6
iMacros Classic Browser !X_PERFLOG_NOTARGETPATH Version 10.3 to 12.6
iMacros Classic Browser !X_PERM_NEW_WINDOW_BEHAVIOR

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, and iimGet to retrieve variables from a macro. See also this iMacros variable types overview.

Scripting Interface Command Overview iMacros Browser Chrome Firefox iMacros Classic Browser

The Scripting Interface works with the iMacros Browser, Firefox and Chrome (see iimOpen for details on how to switch between the browsers).

  1. iimOpen (old: iimInit())
  2. iimGetBrowserPid
  3. iimDisplay
  4. iimGet (iMacros 12.6)
  5. iimGetInterfaceVersion()
  6. iimGetErrorText (old: iimGetLastError())
  7. iimGetExtract (old: iimGetLastExtract())
  8. iimGetStopwatch (Old: iimGetLastPerformance)
  9. iimGetPerformance
  10. iimPlay and iimPlayCode()
  11. iimSet
  12. iimSetWindowTitle() iMacros Browser iMacros Classic Browser
  13. iimTakeBrowserScreenshot
  14. iimClose (old: iimExit)
  15. Error handling: Scripting Interface Return Codes

Refer to the iMacros Editions Comparison Table to see which editions support the scripting interface (API)

Command Line Interface Overview iMacros Browser iMacros Classic Browser

  1. -delay
  2. -help
  3. -kioskmode
  4. -logfile
  5. -loop
  6. -macro
  7. -noexit
  8. -playlist (iMacros 12.6)
  9. -profiler
  10. -silent
  11. -simpleui
  12. -title
  13. -tray
  14. -variables (iMacros 12.6, deprecated: -var_varname)

Refer to the iMacros Editions Comparison Table to see which iMacros editions support the command-line interface (CLI).

Syntax

Switch names can be prefixed with either a single hyphen, two hyphens, or a forward slash. Some switches also have abbreviations (or aliases). For switches that take a value, the value can be specified using a space, equals sign, or colon character after the switch name. All of the following examples are valid:

imacros.exe -macro MyMacro
imacros.exe --macro=MyMacro
imacros.exe /m:MyMacro

To see a table of all of the command line switches along with their descriptions and aliases, enter:

imacros.exe /?

or

imacros.exe -h

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 (discontinued)

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