NEWBIE : How to Loop and Click Next?

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 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.
Post Reply
arturino
Posts: 1
Joined: Wed Aug 16, 2017 9:49 pm

NEWBIE : How to Loop and Click Next?

Post by arturino » Wed Aug 16, 2017 9: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
chivracq
Posts: 8040
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: NEWBIE : How to Loop and Click Next?

Post by chivracq » Wed Aug 16, 2017 10: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...
Post Reply