Take the 2-minute tour ×

I want to use nested loop in iMacros.

macro =  "CODE:";
macro += "URL GOTO=https://www.pleasehelp.org/search.php?type=0&sort=pop&page={{n}} " + "\n";
macro += "TAG POS={{i}} TYPE=B ATTR=TEXT:*" + "\n";
macro += "TAG POS=1 TYPE=A ATTR=TXT:Send" + "\n"; 

for (var n = 5; n < 700; n++) {

    for (var i=6;i<30;i++)
        n = n + 1


I want first loop to be executed once the second loop completed. But both loops are executing together. Please suggest how can we achieve this. ?

share|improve this question
What do you mean by first and second loop? Is the first the inner or the outer loop? –  ThreeFx Jun 8 at 14:04
First the outer loop and second is the inner loop. –  Prabhat Srivastava Jun 9 at 1:41
You do not have any statements located in the outer loop, so what exactly do you want to do? –  ThreeFx Jun 9 at 9:45
macro += "URL GOTO=pleasehelp.org/search.php?type=0&sort=pop&page={{n}} " + "\n";. value in url "n" to be changed by outer loop. –  Prabhat Srivastava Jun 10 at 2:16

Your Answer



Browse other questions tagged or ask your own question.