Extract every other position?

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

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.

Extract every other position?

by erikcw on Mon Nov 14, 2005 7:38 am

Hi,

Is it possible to create a macro that will loop through a table extracting every other postion? (ie just extract the even postion numbers)

1. itema
2. itemb
3. itemc
4. itemd
5. iteme
6. itemf


This data is in a table, so "1." is POS 1 and itema is in POS 2. Basically all the item numbers are in odd POS and the data is in even POS.

Can I make the loop extract every other value? The programing equivalent of {{!LOOP}}++?

I tried extracting the whole table, but instead of putting it in a cvs file it lumps all the data togeather...

Thanks for your help!
erikcw
 
Posts: 34
Joined: Sun Nov 13, 2005 10:08 am

by Guest on Mon Nov 14, 2005 9:15 pm

in order to do so, i believe u hv to intergrate it with some other program languages, and then pass in the position as a variable

at least... that's how i did it... any other better suggestions?
Guest
 

by Tech Support on Tue Nov 15, 2005 5:56 pm

"Guest" is right: This can be done using the Scripting Interface:

For m=1 to 100 step 2
i = iim1.iimSet ("-var_mypos", cstr(m))
i = iim1.iimPlay ("your_macro")
Next

=> replace POS={{!LOOP}} with POS={{mypos}} in the macro.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

-->