Looping through A to Z

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
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

Looping through A to Z

Post by Guest1 » Mon Nov 21, 2005 6:53 am

The start page of a website which I would like to download info from look like this:

a b c d e f g h i j k l m
n o p q r s t u v w x y z


What I would like to do is to have a set of macros that can go to the start page, select the page ("a" for example), click on record1, save the page, go back to record2 and do the same steps for the rest of the records and pages. Each of these alphabetised pages do not have any "back" button to bring you back to the index page nor do the individual records. So, I'll have to go back to the start page all the time to select the page to go to next.

The steps to be covered by my macros would look something like this...

Macro1: Go to start page, Click on page "a", retrieve the page.
Macro2: Loop through the records by clicking on each individual record and save the resultant page.
Macro1: Replayed to go to start page, Select page (this time page "b"), retrieve the details
Macro2 is repeated and so forth.

While I've no problem getting macro2 to loop through the records with a page, what should be in macro1 to enable it to loop through a to z? Using {{!LOOP}} allows me to loop through a to z provided that macro1 is played coninuously. Once macro2 is scripted to follow macro1 before reverting back to macro1, the {!LOOP}} in macro1 no longer seems to be able identify that the next page is "b" and so forth.

The urls of the start page reads: http://asp.abc.com/index.asp?codename=A and the subsequent page is http://asp.abc.com/index.asp?codename=B

If the pages are numbered, I could still use the scripting example with variables and cstr(m) to handle the iterations to turn the page. But, when it is alphabetised and each page has its own unique url e.g. http://asp.abc.com.sg/index.asp?codename=A, how do I go about scripting this?

Hope this isn't too wordy and confusing. Thanks for your help.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm

Post by Tech Support » Mon Nov 21, 2005 9:05 pm

Please see our Google Search Example (with source code) at http://forum.imacros.net/viewtopic.php?t=6

I think the same approach works well in your case.

Post by Guest1 » Tue Nov 22, 2005 3:02 am

Thanks! I'll take a look at it.
Post Reply