我想在imacros中的一组循环之间设置一个延迟

最后发布: 2014-03-30 19:18:49


问题

嗨,我想设置一个较长的延迟,例如,我的脚本的每100个循环之间有3600秒的延迟,请问这是否可行!

 VERSION BUILD=8810214 RECORDER=FX
 TAB T=1
 SET !EXTRACT_TEST_POPUP NO
 set !errorignore yes
 SET !TIMEOUT_TAG 0
 SET !TIMEOUT_PAGE 10
 SET !TIMEOUT_STEP 1

 URL GOTO=http://statigr.am/viewer.php
 TAG POS=1 TYPE=INPUT:TEXT FORM=ID:searchForm ATTR=ID:getSearch CONTENT=selfie
 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchForm ATTR=ID:startSearch
 TAG POS=2 TYPE=A ATTR=TXT:selfie
 TAG POS=1 TYPE=A ATTR=ID:like*
 'pause
 Wait seconds=2
 URL GOTO=http://statigr.am/viewer.php
loops imacros
回答

是。 用JS脚本。

 //define the macro
 var macro;

 macro="CODE:";

 macro +="VERSION BUILD=8810214 RECORDER=FX"+"\n";
 macro +="TAB T=1"+"\n";
 macro +="SET !EXTRACT_TEST_POPUP NO"+"\n";
 macro +="set !errorignore yes"+"\n";
 macro +="SET !TIMEOUT_TAG 0"+"\n";
 macro +="SET !TIMEOUT_PAGE 10"+"\n";
 macro +="SET !TIMEOUT_STEP 1"+"\n";

 macro +="URL GOTO=http://statigr.am/viewer.php"+"\n";
 macro +="TAG POS=1 TYPE=INPUT:TEXT FORM=ID:searchForm ATTR=ID:getSearch CONTENT=selfie"+"\n";
 macro +="TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchForm ATTR=ID:startSearch"+"\n";
 macro +="TAG POS=2 TYPE=A ATTR=TXT:selfie"+"\n";
 macro +="TAG POS=1 TYPE=A ATTR=ID:like*"+"\n";
 macro +="'pause"+"\n";
 macro +="Wait seconds=2"+"\n";
 macro +="URL GOTO=http://statigr.am/viewer.php"+"\n";


 //loop the macro 
 for(var i=1;i<=1000;i++)
 {

 //play macro
 iimPlay(macro)

 //after 100 loops pause for 3600 seconds
 if(macro%100==0)
 {

 iimPlay("CODE:WAIT SECONDS=3600")

 }


 }