How to use JavaScript in imacros?

末鹿安然 提交于 2019-11-30 08:59:39
Creamstout10

It looks like you are trying to run javascript inside an iim file. Open notepad or another text editor and paste the following code:

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

iimPlay(test)

Save the file with a .js extension. Next open up firefox and the iMacros addon. Go to Manage -> Settings -> Paths Tab -> Folder Datasource. Enter the path where you saved the file above. Refresh iMacros by clicking the iMacro button on and off. The javascript file should show up in the left pane. Run the file to test.

You should notice the icon to the left of the file name is different for the javascript files and the extension is ".js" instead of ".iim".

Good answer Creamstout83

I would also add this to answer above. Un checking this option will speed up the process. And checking it will enable better debugging.

If you're experiencing this problem while using Chrome to run iMacros; the answer is really simple:

Download Firefox and run the iMacros plugin on there.

I experienced the same problem, receiving the error message: "Error -1100: Unknown command: VAR at line: 1", while using Chrome.

But with Firefox I can now run javascript files, have more options to play around with, and less bugs to disrupt my scrapes.

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