Feature Request for !LOOP

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Posts: 29
Joined: Thu Mar 01, 2007 10:07 am

Feature Request for !LOOP

Post by addiktion » Thu Mar 22, 2007 11:04 pm

Hey guys I was desiring a feature for this Firefox build. Here's my scenario.

Say I'm on a site with 15 pages. I want to view pages 1-5 SKIP 5-10 and then run 10-15. The problem I'm having is I cannot edit where the loop number starts. if I could edit the loop number while the macro is not running to continue off from 10-15 then I'd successfully be able to do what I want and it would prove to be more flexible with specifying the loop number to start with.

So you'd ungrey the repeat macro area i'd put in Start Loop:10 til End Loop:15 (really only loops 5 numbers) but uses the original loop number of 10 and continues to 15. While it runs, disable the beginning loop like it is now so it cannot be edited on run time to prevent errors.

I would think this would not be that hard. Or get an increment feature built in where you can specify the number and how it increments. VAR = VAR + 1 for example.

Will the ADD command do this?
Hannes, Tech Support

Post by Hannes, Tech Support » Fri Mar 23, 2007 2:08 pm


although I see what you need, I don't completely understand the mechanism you propose.

Perhaps running the macro controlled by JavaScript is an easier solution for you? Cf. the "SI-Run-Test.js" example that came with the extension.

Posts: 29
Joined: Thu Mar 01, 2007 10:07 am

Post by addiktion » Sat Mar 24, 2007 8:03 am

Hi Hannes,

Thanks for the prompt reply. Unfortunately I only know very little javascript. Is there anyway to continue a loop?

My coding is using the {{!LOOP}} number to correspond with the number of pages. The problem I have is if the loop errors out (the page times out) then I have to start the loop over again. Heres an example of what I got.

URL GOTO=http://www.example.com/page={{!LOOP}}
The pages cycle through according to the number I specify in loop. So If I enter 32 it would cycle 1,2,3 ... 32 pages and then stop. However the problem arises when the page times out or there is an error on the page. Then I have to start back at one in the loop count. Is there a feature that will allow me to continue off from the page I left it? Or if I did this in javascript could you show me an example of what the code would look like to cycle through pages and continue at a page of my choice. That way if it dropped out at 32 then I could just start back at that number and move onto 33, 34, etc.

Before I manually entered in about a bazillion pages in the coding making the coding relatively large until I stumbled on the incremental {{!LOOP}} coding then I simplified the coding and now I'm having problems continuing at the page stop.
Posts: 29
Joined: Thu Mar 01, 2007 10:07 am

Post by addiktion » Tue Mar 27, 2007 1:07 am

I have figured out how to continue off on loops.

You use the Set !LOOP # command to specify what the loop number should start with.
Post Reply