Difference between revisions of "Command Reference"

From iMacros
Jump to navigation Jump to search
Line 59: Line 59:
 
|-
 
|-
 
|[[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]]||[[PRINT]]
 
|[[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]]||[[PRINT]]
 +
|-
 +
|[[Image:NGIM-icon.png|iMacros 2021.0]]||[[PRINTPDF]]
 
|-
 
|-
 
|[[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]] [[Image:Ff-icon.png|Firefox]] [[Image:Cr-icon.png|Chrome]] [[Image:NGIM-icon.png|iMacros 2021.0]]||[[PROMPT]]
 
|[[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]] [[Image:Ff-icon.png|Firefox]] [[Image:Cr-icon.png|Chrome]] [[Image:NGIM-icon.png|iMacros 2021.0]]||[[PROMPT]]

Revision as of 05:31, 17 March 2021

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


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

The Scripting Interface works with the iMacros Browser, Internet Explorer, 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 IE Plug-in
  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 IE Plug-in iMacros 2021.0

  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)

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

  1. -timeout IE Plug-in
  2. -iePrivate IE Plug-in

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

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