admin管理员组文章数量:1318563
How do I execute JavaScript from an iMacro script?
URL GOTO=javascript:alert("TEST");
The Javascript works fine when pasting it into the address bar (by putting "javascript:
" in front of the code) but unfortunately iMacros does not recognize this as a valid URL.
So since this doesn't work, what's the correct way to run JavaScript from an iMacro script?
How do I execute JavaScript from an iMacro script?
URL GOTO=javascript:alert("TEST");
The Javascript works fine when pasting it into the address bar (by putting "javascript:
" in front of the code) but unfortunately iMacros does not recognize this as a valid URL.
So since this doesn't work, what's the correct way to run JavaScript from an iMacro script?
Share Improve this question edited Mar 5, 2015 at 17:47 George Stocker 57.9k29 gold badges181 silver badges238 bronze badges asked Mar 5, 2015 at 17:39 MeowlsMeowls 591 gold badge1 silver badge5 bronze badges 02 Answers
Reset to default 4Try something without a dialog. For example: URL GOTO=javascript:console.log("TEST");
or URL GOTO=javascript:function<SP>test(){status="TEST"};void<SP>test();
make a separate java-script file and then call it from your macro using
URL GOTO=imacros://run/?m=your-javascript.js
note that this method is not actually perfect cause imacros does not support calling javascript files from within macros, so this is a workaround and may have certain side effects - enterprise imacros support callback for javascript files.
本文标签: How do I execute JavaScript from an iMacro scriptStack Overflow
版权声明:本文标题:How do I execute JavaScript from an iMacro script? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742049131a2417968.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论