loop imacro with js, pause for 20seconds, then start again

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
davep
Posts: 1
Joined: Fri Dec 13, 2013 8:31 pm

loop imacro with js, pause for 20seconds, then start again

Post by davep » Fri Dec 13, 2013 8:36 pm

Hi, I have the following js code but cant figure out how to pause it for 20 seconds then start it back up at the last position it left off at. Any help would be great!!

var macro;
macro = "CODE:";
macro += "TAG POS={{i}} TYPE=BUTTON ATTR=CLASS:btn<SP>btn-small<SP>likebutton" + "\n";
macro += "WAIT SECONDS=2" + "\n";
for(i=1;i<=5;i++){
if(i==5){
macro += "WAIT SECONDS=15" + "\n";
var i=6;
//iimSet("i",i);
iimPlay(macro);
}
iimSet("i",i);
iimPlay(macro);

}
Post Reply