How to invoke an iMacro from JavaScript?

心不动则不痛 提交于 2019-12-03 08:30:33

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.

simple example code would be:

iimPlay(Test.iim);

here you can find additional information about it: http://wiki.imacros.net/iimPlay

You can also use an imacros java script converter where you copy paste your whole script, and recieve the final code as a java script.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!