How to call iMacro from JavaScript?

I have an iMacro ' Test.iim ' and I want to play or call this iMacro from javascript, which is attached to an event with a button click on my web page.
Please help with some sample code.

+6
source share
3 answers

The answer is:

iimPlay("Test.iim") 

When you call a macro inside the Macros folder, put a "" around the macro and it will play it. Also you can add a timer for this macro like this.

 iimPlay("Test.iim",60) 

This means that the macro has a maximum of 60 seconds to complete.

When playing back a macro declared as a variable inside a .js file, you do it like

 var test; test ="CODE:"; test +="SET !ERRORIGNORE YES "+"\n"; test +="URL GOTO=www.google.com "+"\n"; iimPlay(test,60) 

And it's all.

+6
source

simple code example:

 iimPlay(Test.iim); 

here you can find more information: http://wiki.imacros.net/iimPlay

+1
source

You can also use imacros java script converter , where you copy all your script and get the final code as a java script.

0
source

All Articles