iMacros调用JS变量:
var url = "https://www.haiyun.me";
iimSet("imacros",js);
var macro
macro ="CODE:";
macro +="SET !TIMEOUT_STEP 1"+"\n";
macro +="URL GOTO={{url}}"+"\n";
JS调用iMacros脚本内变量:
var macro;
macro = "CODE:";
macro += "PROMPT 请输入验证码: !VAR1 " + "\n";
macro += "SET !EXTRACT {{!VAR1}}" + "\n";
iimPlay(macro)
var captcha = iimGetExtract();
alert(captcha);
在JS中执行iMacros脚本:
var macro
macro ="CODE:";
//macro +="TAB CLOSEALLOTHERS";
macro +="SET !TIMEOUT_STEP 1"+"\n";
macro +="URL GOTO=https://www.haiyun.me"+"\n";
iimPlay(macro);