Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to invoke an iMacro from JavaScript?

I have an iMacro 'Test.iim' and I want to play or call this iMacro from a javascript that is attached into a button click event in my webpage.
Please Help with some sample code.

like image 762
Vishnu Y Avatar asked Jan 03 '13 08:01

Vishnu Y


1 Answers

The answer is this.

iimPlay("Test.iim")

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

iimPlay("Test.iim",60)

This means the macro has maximum 60 seconds to complete.

When playing the macro which is declared as variable inside the .js file then you do it like this

var test;

test ="CODE:";
test +="SET !ERRORIGNORE YES "+"\n";
test +="URL GOTO=www.google.com "+"\n";


iimPlay(test,60)

And that is all.

like image 136
macroscripts Avatar answered Sep 28 '22 19:09

macroscripts