iMacros for Chrome

From iMacros
Revision as of 11:38, 4 September 2017 by Td (Talk | contribs)

Jump to: navigation, search

Thank your for using iMacros for Chrome, the open-source web automation solution.


iMacros for Chrome End User License Agreement


  • Firefox Download the latest version iMacros_for_Chrome - this version fixes the Chrome V35 issues!

No administrative rights are required for the installation. All versions of Chrome (Win, Mac and Linux) are supported.

This installer supports storing macros inside bookmarks. If this is all you want, then there is nothing else to do. But if you prefer to store macros in regular text files (like iMacros for Firefox/IE do), then please install our new file access modules below.

Add File Access

The default install of iMacros for Chrome V8 and higher allows you to only store macros in bookmarks. If you want to store the macros in text files on your hard drive or you are using macros that access data files (via !DATASOURCE), please install one of these free file access enhancements:

Please install iMacros for Chrome before installing the file access module. The installers below contain ONLY the file access code, not the complete iMacros for Chrome extension.

    • It can be used for both, Mac and Linux.
    • The install script is inside the "gz" file. The command to unpack it from command line is
    • tar -xvf imacros_fio.tar.gz
    • After that command is executed the imacros_fio directory is created. Please move that directory to some place where it will be persistent, e.g. ~/iMacros
    • then cd to that directory and execute ./
    • (Checksum: MD5 (imacros_fio.tar.gz) = dc668d1b8265443e0ef7314a6bc92b3f)

This is how iMacros for Chrome looks without the new and free file access module installed. Once it is installed, you will see the familiar treeview there.

How to install an extension from outside the Chrome gallery

Extensions that you download from the Chrome Web Store are installed automatically, which is great for distribution, but not so great for development. Recognizing this, Chrome gives you a quick way of loading up your working directory for testing. Let's do that now.

  • Visit chrome://extensions in your browser (or open up the Chrome menu by clicking the icon to the far right of the Omnibox: The menu's icon is three horizontal bars.. and select Extensions under the Tools menu to get to the same place).
  • Ensure that the Developer mode checkbox in the top right-hand corner is checked.
  • Drag & drop the imacros-yyy.crx beta version on the extension page. This works only on the extension page. Chrome checks if the extension is valid, it'll be loaded up and active right away!

This does not work Chrome V36 Beta on Windows: That is caused by a new, upcoming security improvement: Starting with V36, Chrome will block all installs from outside the Google Chrome Gallery! So far this block seems to be only in the Windows version, not Chrome 36 for Linux or Mac. To work around this, install our beta version from the gallery.

First Steps

After you installed iMacros for Chrome you will see the iMacros icon in the toolbar. First we recommend that you look at a few demo macros. After this start recording your first own macro. To get start, a simple website like this wiki or our company website are a good start. To record, open the iMacros panel and click record. When you are done recording, click the stop icon either in the panel or in the Chrome toolbar. The iMacros icon changes to a stop button with line counter during recording and replay.

The iMacros for Chrome Panel: You can start playing macros either from the iMacros panel or from your bookmarks or macros that are embedded into websites.
The iMacros icon changes to a stop button with line counter during recording and replay. The WAIT command displays the wait time as countdown.

The iMacros panel has a loop button to run macros repeatedly. This can be useful for checking a certain web page status or for web testing. While the loop is running, the current loop number is stored in the !LOOP internal variable.

Example usage: Create a macro that refreshes the current page every 5 seconds:

Start the PAGE REFRESH macro with the LOOP button.

iMacros as Bookmarklets

If you are used to other iMacros versions, you might be surprised that iMacros for Chrome does not store its macros as text files. The reason for this is that Chrome extensions can not write or read files unless they use a special NPAPI dll (Update: iMacros for Chrome V2.0 Beta has such a DLL and can now read and write normal macros!). Instead we are testing a new concept and store macros as bookmarklets inside the regular Chrome bookmarking system.

This means you can take full advantage of the Google Bookmark Sync features or bookmark sync extensions such as Xmarks.

As the macros are packed as bookmarklets, you can just drag & drop them to your bookmarks folder or bookmarks bar.

Example: Search the German railway website for train connection from Frankfurt International Airport to Mannheim - Select "Proceed to this site" to run the macro!

You can rename, edit or delete your iMacros via the the Chrome bookmark manager
You can sync your iMacros macros just like normal bookmarks. And with the iMacros secure password encryption that means that you can even store login macros securely in the cloud.
iMacros for Chrome V2 Beta can view, run and edit the standard *.iim text file based macros, just like iMacros for Firefox/IE.

Social Scripting

iMacros for Chrome pioneers the social scripting concept. Users can embed the complete macro in a simple link that can be shared with friends and coworkers. Users can also embed the link on their homepage, blog and company Intranet. In this way, users can help website visitors perform certain tasks. Instead of telling visitors how to fill out a form, users can let iMacros fill out the form for them. All information is stored inside the link as a text string, and nothing is stored on our servers.

Important: Make sure the embedded macro is url-encoded using e.g. this tool.

Tip: To send macros (bookmarklets) by email, use the link shortener service. Example usage:

"Hi Sandra, which of the available flights do you prefer? Just click the link to run the search and get up-to-date pricing."

Demo and Test Macros

For a list of demo and test macros please see If these macros replay fine in your Google Chrome browser, then the basic installation of iMacros for Chrome is ok.

Command Line Support

The Google Chrome API does not provide command line information for extensions yet, but user "cammarin" suggested a great way to use iMacros for Chrome via the command line: Embed the iMacros bookmarklet in a local web page.

  1. Make sure that "Allow access to file URLs" is enabled for the iMacros extension as shown here.
  2. Create a bookmark for the macro you want to launch
  3. Right-click on the bookmark in Chrome (not in the iMacros sidebar) and select Edit
  4. In the URL field, copy the value of the e_m64 variable, e.g. everything between quotes where you see: var e_m64 = "..."
  5. Paste this value in place of the corresponding value for var e_m64 in the HTML file shown below


     <body onload="window.setTimeout('document.getElementById(\'criimlaunch\').click();', 1000);">


        <a id="criimlaunch" href="javascript:(function() {try{if(!/^(?:chrome|https?|file)/.test(location)){alert('iMacros: Open webpage to run a macro.');return;}var macro = {};macro.source = decodeURIComponent(atob(e_m64)); = 'MacroBookmarklet';var evt = document.createEvent('CustomEvent');evt.initCustomEvent('iMacrosRunMacro', true, true, macro);window.dispatchEvent(evt);}catch(e){alert('iMacros Bookmarklet error: '+e.toString());}}) ();">Launch CR iMacros</a>


Example command line / batch file:

 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" file:///D:/web/test.htm

"test.htm" is the local webpage with the bookmarklet.

Alternatively, you can embed the macro source code directly into the HTML file and skip the process of creating a macro bookmark altogether (special thanks to forum user iimfun for this solution!):

   <body onload="window.setTimeout('document.getElementById(\'criimlaunch\').click();', 1000);">

         var macroCode = '';
         macroCode += 'PROMPT HELLO!\n';
         macroCode += 'URL GOTO=\n';
         macroCode += 'PROMPT BYE!\n';

         function launchMacro()
                     alert('iMacros: Open webpage to run a macro.');
                  var macro = {}; 
                  macro.source = macroCode;
         = 'EmbeddedMacro';
                  var evt = document.createEvent('CustomEvent');
                  evt.initCustomEvent('iMacrosRunMacro', true, true, macro);
               alert('iMacros Bookmarklet error: '+e.toString());

      <a id="criimlaunch" href="javascript:launchMacro();">Launch CR iMacros</a>


Related forum post: How to run a macro from the command line using Chrome

Scripting Chrome

Google Chrome, the complete browser, can be scripted with the iMacros Scripting Interface (API) included with some of the iMacros paid editions. The API allows you to control Chrome from external software (C++, C#, Python, Perl,...). For details, see the chapter with the iimOpen command.

Using Chrome with the iMacros RunAs Agent (iimRunner)

  1. iimRunner only works with a non-default Chrome UserDataDir (aka profile)
  2. Make sure the iMacros add-on is installed in the new user profile.
  3. In order to launch Chrome with a different user profile via the iMacros scripting interface (e.g. iimOpen("-cr -crUserDataDir C:\MyProfile")) or with iimRunner (e.g. iimOpen("-cr -runner -crUserDataDir C:\MyProfile")), you need to allow access to file URLs:
    1. In the Chrome menu, go to More tools - Extensions and find iMacros in the list of extensions
    2. Make sure "Allow access to file URLs" is checked
Allow access to file URLs (with border).png

Where is the iimDisplay message?

Due to Chrome's UI, we opted to show messages output by iimDisplay as a desktop notification pop-up window.

In iMacros for Chrome, if the sidebar is not available (e.g. if you start the browser from scripting interface API or run macros from bookmarks menu) errors and iimDisplay() messages are shown in a desktop notification pop-up window.

Getting Help

If you run into any issues, please don't hesitate to contact us on our support forum. Take a quick look through the forum before asking your question, we might already have a solution or work around available.


While iMacros for Chrome works well for many web automation tasks, some iMacros features are not yet implemented. But we are working on it.

Not yet available:

(*) Feature requires updates to the Chrome extensions API before we can implement it.

Version History

Read what's new:

  • 2016-06-20 V8.4.4 Download now
    • Added: new recording mode EVENT
    • Added: TAG SELECTOR command, to localize element using CSS selectors
    • Several bug fixes

  • 2016-04-28 V8.3.5 Download now
    • Fixed: support for Chrome v49

  • 2015-07-23 V8.3.4 Download now
    • Fixes several reported issues with automating file downloads
    • New: Automate file downloads in Chrome - We added support for ONDOWNLOAD !!!

  • 2014-05-28 V8.07 Download now
    • New: Chrome V35 bug workaround
    • New: New Scripting interface, workaround for Chrome's block of NPAPI dlls - requires separate installer.

Due to Chrome restrictions, the updated extension only supports macros inside bookmarks. For file access, please install our new file access modules - get them at iMacros_for_Chrome#Installation.

  • 2014-03-10 V7.03 Download now (To install: Download and unzip the content. In Chrome, go to More Tools > Extensions. Then, on the Chrome extension page, check the "Developer mode" box and then load this extension as "Unpacked extension").
    • Fixed: Shrinking sidebar bug (only Linux systems affected). This fix is actually a workaround for a Chrome bug.

  • 2014-03-10 V7.02
    • New: Significantly improved UI
    • New: Upload support for AlertFox Website Monitoring
    • Fixed: Many smaller bug fixes and tweaks

  • 2013-07-05 V6.06
    • New: New indicator for the recording/replay position
    • Improved: Bookmarklet conversion
    • Fixed: Many smaller bug fixes and tweaks

Important note for iMacros Enterprise Edition users: The updated iMacros Chrome Scripting Interface requires iMacros V9.02 or this patch. After downloading the patch, unzip and run "install.cmd" as administrator. It updates the Chrome connector to the latest version. This patch supports both, iMacros 8 and 9.

V6.06 features the new floating iMacros icon...(also in the new iMacros for Firefox)

  • 2012-10-08 V5.21
    • Added: EVAL
    • Added: Performance log feature
    • Improved: iimTakeBrowserScreenshot support
    • Improved: Bookmarklets support - now iMacros for Chrome and iMacros for Firefox bookmarklets have the same format.
    • Fixed: MAC Chrome compatibility issues introduced by Chrome V22
    • Fixed: BACK button not recorded
    • Fixed: Many smaller bug fixes

  • 2012-04-24 V5.01
    • Added: FRAME support
    • Added: SAVEAS support
    • Added: EVAL support
    • Added: Support for TIMEOUT_PAGE and TIMEOUT_MACRO
    • Improved: iMacros Chrome icon is changed only on those windows where replaying or recording happens
    • Fixed: Negative counter issue
    • Fixed: Several smaller bug fixes

  • 2012-02-09 V4.01
    • Added: Visual display for recorded commands
    • Added: Visual display for replayed commands
    • Added: iimDisplay support
    • Improved: Web Scripting Interface: control Chrome with iimInit ("-cr").

New visual display for recording and replay
iMacros for Chrome can store macros as text files (fully compatible with iMacros for IE and Firefox) and also embeded them inside bookmarks - perfect for quick access and syncing macros with your bookmarks. Use the macro storage option to switch.

  • 2011-07-15 V3.5.3
    • Added: Re-added support for iMacros in bookmarks
    • Added: Conversion of macros between "stored as local file" and "stored as bookmarks". Bookmark storage is great for automated syncing.
    • Added: Double treeview - view macros stored as files and in bookmarks.

  • 2011-05-05 V3.5.1 Beta
    • Added: Mac OSX support!
    • Added: Improved iimInit ("-cr") support

  • 2011-01-20 V3.0.2 Beta

  • 2010-05-20 V2.0.1 Beta
    • Added: Read/write/edit standard text based iMacros macro files ("*.iim" files).
    • Added: Drag & Drop tree view
    • Added: Run more than one instance (requires Google Chrome V5.x)
    • Fixed: Several minor issues

  • 2010-02-08 V1.1.1
    • Added: !CLIPBOARD command: SET !CLIPBOARD "Hi" works, but {{!CLIPBOARD}} does not currently work due to a bug in Chrome.
    • Added: Macro edit, rename and delete with right-click
    • Added: STOPWATCH - Result is written to Chrome Javascript Console
    • Fixed: Several minor issues

  • 2009-12-5 V1.0.0
    • Added: Improved GUI, panel now stays open during record and replay
    • Added: Pause button
    • Added: LOOP button & {{!LOOP}} variable
    • Added: REFRESH
    • Fixed: Several smaller issues

  • 2009-12-1 V0.6.5
    • Added: Line numbers and WAIT time in seconds are displayed as text in the browser action icon
    • Fixed: Another page load timing issue

  • 2009-11-30 V0.6.1
    • Fixed: Page load timing issue

  • 2009-11-23 V0.5.0
    • Added: Browser Action support
    • Fixed: Encoding issue for Non-ASCII characters in macro. Bookmarklets now Base64 encoded.
    • Fixed: Several smaller issues

  • 2009-10-01 V0.3.2
    • Added: Initial release

Version Archive

(more available soon)

  • 2015-03-20 V8.2.0 => Download now (To install: Download and unzip the content. In Chrome, go to More Tools > Extensions. Then, on the Chrome extension page, check the "Developer mode" box and then load this extension as "Unpacked extension").

How to install an older version

As of Chrome V22 Google has blocked the installation of Chrome extensions that are not hosted in their web store. So if support emails you a iMacros for Chrome extension as beta version please install it this way:

How to install:

  • Open Chrome, navigate to Tools > Extensions
  • Drag and drop the imacros-xyz.crx extension on the extension page


Chrome displays a scary security warning when installing iMacros for Chrome. So we sometimes get questions like:

Q: When I click the link to install iMacros, Chrome pops up a warning with this message: "All data on your computer and the websites you visit". Is this actually true or is it an over reaction from Chrome programming?

A: iMacros for Chrome needs to read and write the macro files. So technically we need permission to access files on your PC - and thus we could access all files on your PC - just as any other program that you install. Of course, we don't do that. Also, our iMacros for Chrome code is open-source, so everyone can verify it.

To summarize, that is a very strong warning from the Chrome team for a simple thing. iMacros for Chrome does not do anything bad or unexpected.

Known Issues

Please report any problem in our user forum. We can only fix issues that you report! Thank you for your help.

All issues will be fixed as soon as possible.

See Also

iMacros Community Editions, iMacros for Firefox, Compare all iMacros versions, iMacros 7 Version History