NEWBIE : How to Loop and Click Next?

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.

NEWBIE : How to Loop and Click Next?

by arturino on Wed Aug 16, 2017 2:53 pm

first time using iMacros.

I want to run a loop 50x then when it is done,
click the "Next" button and run the same loop again 50x,
click "Next"... and run until "Next" is no longer clickable.

so far i have this working for 1x loop.
but i cant get it to run the text extraction+CSV export 50x.. THEN click NEXT.


Code: Select all
SET !LOOP 1

TAG POS={{!LOOP}} TYPE=TD ATTR=CLASS:domain EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Extract_{{!NOW:ddmmyy}}.csv

'click NEXT'
TAG POS=1 TYPE=A ATTR=TXT:Next

WAIT SECONDS=3
arturino
 
Posts: 1
Joined: Wed Aug 16, 2017 2:49 pm

Re: NEWBIE : How to Loop and Click Next?

by chivracq on Wed Aug 16, 2017 3:58 pm

arturino wrote:first time using iMacros.

I want to run a loop 50x then when it is done,
click the "Next" button and run the same loop again 50x,
click "Next"... and run until "Next" is no longer clickable.

so far i have this working for 1x loop.
but i cant get it to run the text extraction+CSV export 50x.. THEN click NEXT.

Code: Select all
SET !LOOP 1

TAG POS={{!LOOP}} TYPE=TD ATTR=CLASS:domain EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Extract_{{!NOW:ddmmyy}}.csv

'click NEXT'
TAG POS=1 TYPE=A ATTR=TXT:Next

WAIT SECONDS=3

CIM...! :mrgreen: (Read my Sig..., or the Forum Rules..., yep sorry a bit stricter on this Forum than on SOF...)

For your Qt, use/search the Forum for "Nested Loop + Modulo"... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Google [Bot] and 4 guests

-->