U have imacros script and I want to add wait seconds 60 When i
reach to 20.
This is my code now:
var macro;
macro = "CODE:";
macro += "URL GOTO=http://example.com/msg?uid={{i}}\n";
macro +="TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:msg ATTR=ID:subject CONTENT=hello\n";
macro +="TAG POS=1 TYPE=TEXTAREA FORM=NAME:msg ATTR=ID:message CONTENT=hi\n";
macro +="TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:msg ATTR=ID:btn_save";
for (var i=1;i<300;i++){
iimSet("i",i)
iimPlay(macro)
}
iimDisplay("Script completed.");
And I also tried this one:
var macro;
macro = "CODE:";
macro += "URL GOTO=http://example.com/msg?uid={{i}}\n";
macro +="TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:msg ATTR=ID:subject CONTENT=hello\n";
macro +="TAG POS=1 TYPE=TEXTAREA FORM=NAME:msg ATTR=ID:message CONTENT=hi\n";
macro +="TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:msg ATTR=ID:btn_save";
iimDisplay("Send Macro via iimPlay");
retcode = iimPlay(macro);
var i=2
while(true){
if(i%20==0){
iimPlay("CODE: WAIT SECONDS=60")
}
iimSet("i",i);
iimPlay(macro);
}
for (var i=1;i<999;i++){
iimSet("i",i)
iimPlay(macro)
}
iimDisplay("Script completed.");
But both code are not working for me. Can anybody help me? Thank you !
In your first code change the loop in the following way: