Download a list of png with a loop

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
morgate666
Posts: 1
Joined: Wed Jul 20, 2022 10:34 am

Download a list of png with a loop

Post by morgate666 » Wed Jul 20, 2022 10:56 am

Hi, I'm a beginner with iMacros and I want to download a list of png with a loop, here is my code :

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SAVEAS TYPE=PNG FOLDER=* FILE=CPPINFO2021
TAG POS=1 TYPE=IMG ATTR=SRC:https://www.doc-solus.fr/lib/images/icones/fleches/fleche.droite.3d.bleu.h100px.jpg
The problem is that at each loop the png gets replaced by a different png with the same name.

So I would want to rename at each loop the png (like CCPINFO2021-0, CCPINFO2021-1, CCPINFO2021-2, ...)

If you have any idea ? Thank you in advance.
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

Re: Download a list of png with a loop

Post by techimac » Thu Jul 21, 2022 2:25 am

morgate666 wrote:
Wed Jul 20, 2022 10:56 am
Hi, I'm a beginner with iMacros and I want to download a list of png with a loop, here is my code :

Code: Select all

VERSION BUILD=8970419 RECORDER=FX
TAB T=1
SAVEAS TYPE=PNG FOLDER=* FILE=CPPINFO2021
TAG POS=1 TYPE=IMG ATTR=SRC:https://www.doc-solus.fr/lib/images/icones/fleches/fleche.droite.3d.bleu.h100px.jpg
The problem is that at each loop the png gets replaced by a different png with the same name.

So I would want to rename at each loop the png (like CCPINFO2021-0, CCPINFO2021-1, CCPINFO2021-2, ...)

If you have any idea ? Thank you in advance.
SAVEAS TYPE=PNG FOLDER=* FILE=CPPINFO2021-{{!LOOP}}
Available for custom iim, javascript iMacros scripts
Post Reply