First Steps

From iMacros
Revision as of 10:10, 26 April 2007 by Hm (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Starting iMacros

iMacros can be used in two different modes.

Internet Explorer Plug-in:

After installing the software a new icon called "iOpus iMacros" appears in the menu bar of Internet Explorer (IE). Click this icon to start iOpus iMacros. If you have already customized your toolbar you might need to add the icon to the Internet Explorer toolbar manually.

Please see the relevant FAQ for more on how to do this.

The Special Internet Explorer Browser [PRO and SCRIPTING Edition]:

To start this program click on the icon on your desktop, or navigate to the file "imacros.exe" and click on it.

To become familiar with the iMacros run the "Demo-FillForm" macro that is automatically installed. This demonstrates the basic features of iMacros in an uncluttered way. It navigates to a test form, fills the form, sends it and returns to the iOpus Internet Macro Website.

The iMacros Graphical User Interface

We have invested a lot of effort in making the Graphical User Interface of the iMacros Browser and the Internet Explorer Plug-In as intuitive as possible. In this section the basic elements are explained. There are minor differences between the iMacros Browser and the Plug-In, which will be pointed out as neccessary.

The main window

The main window consists of two parts, on the left you see the iMacros panel and on the right you see the browser window. The website is displayed in the browser window just as you are used to when using any other browser. With the elements on the left you control iMacros.

File:Imacro browser.gif
iMacros browser

The iMacros control can be divided in two parts. At the top you see all your macros. Macros are only recognized by iMacros if they have the file ending .iim and are lying in the Macros directory of your iMacros installation. The default for this is C:\Program Files\iMacros\Macros\.

The bottom part consists of three tabs, Play, Rec and Edit. As the name suggests, in the Play tab you will find controls for playing macros, in the Rec tab controls for recording and in the Edit tab you will find controls for editing.


Starts recording
Stops recording
Saves macro

To record you own macros select the Record tab of iOpus iMacros. Click "Record" to start a recording. Now simply perform whatever tasks you wish to record, such as surfing to web sites, filling out forms, making a test order on your e-commerce site or any other task of your choosing.

Changes "Click Mode"

After you have finished recording press "Stop". The current recording is automatically saved as #Current macro. Press "Save" to save it under an individual name. When saving the macro is parsed and iMacros attempts to remove all double or multiple entries.

Hints for successful recording:

  • A GREEN frame around a tag means that iOpus iMacros supports this tag.
  • A RED frame around a tag means that you have selected a web page element that is not useful for recording such as BODY, which has no active functions.
  • During recording do not use your browsers Back or Forward button or change the address line. Use the functions supplied by iOpus iMacros instead (Internet Explorer Plug-in only).
  • Recording "Clicks". If a macro generates an error during replay you can experiment by selecting the link recording option (Click Mode) manually from the dialog after clicking "Click Mode".
    1. Automatic: iMacros attempts to choose the best recording options (recommended in most cases).
    2. Use Link Name: the link is identified by its name. This works well in most cases except when there are several links with the same name on a page.
    3. Use Link URL: the link is detected by its URL. If the URL changes each time you visit a page this option is not recommended, unless you replace the changing part of the URL with an *. Here is more information.
    4. Use X/Y: the link is identified by its position on the web page. This can be useful if the name and URL of the item you want to click on changes dynamically from visit to visit. It should also be used if the web page element is embedded in JavaScript and iMacros can not find the recorded name during replay because it was created "on the fly" by JavaScript.
    5. Use Windows Clicks: this is the ultimate solution if everything else fails. It simulates standard mouse clicks within the browser window. This feature works with all Web pages but is only available in the iMacros Browser.
  • Because the iMacros recording language is fully documented it is easy to edit and "tweak" the macro manually after recording!
  • iMacros supports two recording options: FAST (the default) and ORIGINAL SPEED. This can be set in the Settings tab of the Options dialog. If you record in the original speed mode iOpus iMacros automatically generates WAIT statements so that the replay is at the same speed as your recording. This is very useful for recording demos. For most purposes, however, you want to replay the tasks a fast as possible.

Tip: Be sure that you check our support page at for the latest recording tips & tricks or submit any recording problems at our online support form at


To replay any macro from the macro directory open the Play tab, select a macro from the list and press "Play". During replay a blue frame shows you which parts of the web site are being manipulated. To run iMacros in the background click on the "Minimize to tray" button (iMacros Browser only).


To replay the recorded sequence several times, fill in the number of loops and press "Play (Loop)"

There are two different options that affect the speed at which macros are replayed. These can be set in the Settings tab of the Options dialog or they can also be changed within the macro with the !REPLAYSPEED variable.

The first option is the replay speed, which can be set to three different values:

  • FAST: the macro is replayed at maximum speed (Recommended in most cases).
  • MEDIUM: iMacros waits for 0.25s between each command.
  • SLOW: iMacros waits for 1s between each command.

The second option is to insert WAIT statements during recording. If the checkbox marked "RECORD original speed" is marked then WAIT statements are included. Thus, during replay these WAIT statements slow down the process of replaying.

Tip: If you want the blue frame to appear during replay add the following statement to your macro:


Errors during replay

We work hard to make iMacros as "intelligent" as possible, but it still is not as smart as you. If an error occurs during replay it is mostly due to a "tricky" web page at which one of the automatic suggestions of the iMacros Recorder failed. In almost all cases re-recording the macro with different settings or manually editing the macro solves the problem. For recording tips please see Recording and for information on how to edit your macro go to the Edit Macros section.

Edit Macros

(Related example macros: Demo-FillForm)

All recorded macros are stored in a plain text file with the ending .iim in the directory defined by the Folder Macros text field in the Path tab of the Options dialog, e.g. C:\Program Files\iMacros\Macros\. You can manually edit and tweak the macros using any text editor you like, e.g. Notepad, which is shipped with the Windows operating system by default. To open any macro open the Edit tab, mark the macro you want to edit and click the "Edit" button. The editor you entered in the Path Macro Editor text field located in the Path tab of Options dialog (Notepad by default) will open and display the macro - in this example we chose Demo-FillForm:


You could now change the content of a form text field. To change the Name below from "Tom Tester" to "Dr. A. Award" locate the TAG command that contains "Tom Tester" and change is as shown below:





When assigning values to the CONTENT parameter of any iMacro command all whitespaces in the text must be substituted by <SP> and all newlines must be substituted by <BR>. After you save the changes to the file iMacros will immediately apply them during the next replay of the macro.


Many web sites require you to type a user name and password before you can enter the site. For instance, personalized pages and web sites containing your financial information require you to log in.

The iMacros Password Manager can help you by storing your user names and passwords in macros, and entering them for you automatically when you visit such sites.

There are three ways to store passwords in macros you record. The password encryption method can be either set or disabled for all macros in the Security tab of the Options dialog or individually for each macro with the !ENCRYPTION variable.

No encryption

The password is stored inside the macro in plain text. This method is very convenient, but keep in mind that everybody who opens the macro can read the password.

Encrypted web site passwords

Passwords are encrypted using a strong 256-bit encryption based on the industry-standard AES algorithm. This encryption requires a master password, which is stored on your own computer in the iMacros settings file. The default master password is "iOpus2004". This master password can and indeed should be changed in the Security tab of the Options dialog. The iMacros settings file is very difficult, but not impossible, for an intruder to read. For macros that need to run unattended this is the best solution possible as every automatic solution needs to store the password somewhere. This is the default setting.

Encrypted web site passwords and ask for the Master Password

Passwords are encrypted using the same strong 256-bit encryption based on the industry-standard AES algorithm as in 2., but the master password is not stored. It is only kept temporarily in memory while you run the macros. You need to re-enter it once when you start iMacros and use a website password the first time; much more secure than the other two options, but less convenient. This means that even if somebody steals your PC they can not run the macros which include website access using passwords. This method is recommended for macros that you start manually, such as your personal online banking macros.

Saving Web Sites

(Related example macro: Demo-ArchivePage, Demo-SaveAs )


iMacros automatically downloads and saves web pages for you. Use the Save Page button and select the format from the iMacros Save As dialog. iMacros will then insert a SAVEAS command in the macro, holding information about the format and the location where the file is saved. The default location is in the downloads\ directory of your iMacros installation. This command is very easily tweaked after the macro has been recorded to fit your needs.

You have different options as to which format you wish use to save the currently displayed web page. These options are


The complete web page is saved. The files and images are saved separately and stored in a folder.


The web page plus images are saved in a single file (Web Archive).


The web page source is saved with no images. If the page has frames all framed HTML pages are saved automatically.


Only the web page text is saved; all HTML tags are omitted.


The value of the variable !EXTRACT is saved in CSV format.


A screenshot of the web page is saved.

Web Site Screenshot

iMacros takes screenshots of the entire web page, no matter what length

(Related example macro: Demo-TakeScreenshot )

The iMacros Browser can automatically take screenshots of web pages. This includes the part "below the fold", i.e. iMacros takes the screenshot of the entire web page, no matter the length, even if it scrolls off-screen!

To take a web page screenshot insert a SAVEAS TYPE=BMP command into the macro like in this example (for the FOLDER and FILE settings see the documentation for the SAVEAS command):


The file format is the standard Windows Bitmap format (BMP). This file format can used with any image editor. Also, it can be compressed effectively with any ZIP compression tool or the Windows built-in "compress contents" option for folders.

Save Website Elements

iMacros can intercept file downloads and even download pictures and other elements from the web site you are visiting.

Download Files

(Related example macro: Demo-Download)

Save Dialog handled by iMacros

Whenever a file download is initiated, Internet Explorer will present you with the dialog shown. This dialog allows you to select want you would like to do with the file. If you choose to save it it will also ask you for the file name and location.

Downloads are controlled by the ONDOWNLOAD command. It has two parameters that control the file name and the folder in which to save the file. It must appear before the macro command that starts the download.

Note: The general web page timeout also applies to downloads. So make sure that the timeout value is long enough to cover the complete download time. If needed you can also increase the timeout value manually inside the macro with the SET !TIMEOUT command. Alternatively, you can add a WAIT SECONDS=#DOWNLOADCOMPLETE# command.

Save Item

In iMacros browser
In IE plug-in

(Related example macro: Demo-ImageDownload )

To download an image (or any other specific web page element) switch to recording mode, navigate to the page and press Save Item in the iMacros Browser or Save Item As in the Internet Explorer Plug-In.

The item download preview opens in the tab on the left. Next, select the image or item in the web browser window. The selection is then displayed in the preview section. If you like the selection press ok. The item download manager automatically adds a TAG line to your macro, e.g.:


You can also create download tag lines manually. During recording simply click on the wanted item and add "CONTENT=EVENT:SAVEITEM" to the generated TAG line in an editor of your choice.

The downloaded files are copied to the iMacros download directory (usually C:\Program Files\iMacros\downloads\). The items are taken directly from the web browser that displayed them; to save time and bandwidth they are not downloaded again. The naming convention for downloaded images is the same as for downloaded files, i.e. they consist of the original file name and a date and time tag. This also means you can use the ONDOWNLOAD command to specify your name for the downloaded image.

You can also download images using SAVEPICTUREAS. The command is named after the corresponding function in the Internet Explorer menu: "Save Picture as". You can right-click on any web page element to see if the web page element supports this feature; if it does iMacros can handle it automatically for you. To create such a command click on the element you would like to save during record and add "CONTENT=EVENT:#SAVEPICTUREAS" manually to the generated TAG command. To control the location and name of the downloaded file use the ONDOWNLOAD command.

Save Target As

(Related example macro: Demo-SaveTargetAs)

To download any kind of web content such as .WVM or .AVI videos, sound files such as .MP3, or documents such as .PDF, first click on the link that connects to the item. In the case of a .PDF file such a link is typically called "Open document" or for a video file "Show video". iMacros records a TAG command:


This would simulate a mouse click on the link. This is not what we want, we need a command similar to the right-click command "Save Target As" in Internet Explorer. This can be archieved by editing the macro and adding "CONTENT=EVENT:SAVETARGETAS" to the recorded normal TAG command. You will then have:


The files downloaded in this way are copied to the iMacros download directory by default. You can use the ONDOWNLOAD command to specify the name and location for the downloaded image.

Save Picture As

(Related example macro: Demo-ImageDownload)

This command is similar to SAVEITEM, which is the default command for image downloading. However, unlike SAVEITEM it does not access the image via the HTML of the website but directly by simulating the Internet Explorer "Save Picture As" command. This can be an advantage on complex websites or websites where images are constructed "on the fly".

To use SAVEPICTUREAS you need to manually edit a recorded macro. Click on the element you wish to download and iMacros will produce a command like


This would simulate a mouse click on the link. Since this is not what we want we need to edit the macro and add "CONTENT=EVENT:SAVETARGETAS" to the recorded TAG command. You will then have


The files downloaded in this way are copied to the iMacros download directory by default. You can use the ONDOWNLOAD command to specify the name and location for the downloaded image.