repeat macro to same row in csv file
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
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
-
- Posts: 15
- Joined: Tue Feb 23, 2010 2:06 pm
repeat macro to same row in csv file
Hi,
Is it possible to automatically make a Macro repeat as many times as the amount of rows in csv file it's grabbing data from?
So if there's 3 rows worth of data on the csv file, make it repeat 3 times?
Is it possible to automatically make a Macro repeat as many times as the amount of rows in csv file it's grabbing data from?
So if there's 3 rows worth of data on the csv file, make it repeat 3 times?
Re: repeat macro to same row in csv file
see this wiki entry.
http://wiki.imacros.net/Demo-Loop-Csv-2-Web
http://wiki.imacros.net/Demo-Loop-Csv-2-Web
-
- Posts: 15
- Joined: Tue Feb 23, 2010 2:06 pm
Re: repeat macro to same row in csv file
Hi kcrowder,kcrowder wrote:see this wiki entry.
http://wiki.imacros.net/Demo-Loop-Csv-2-Web
Thank you for your help but that is kind of the same script I have, but what I want to do is make it repeat itself as many time as rows on my csv.
-
- Posts: 15
- Joined: Tue Feb 23, 2010 2:06 pm
Re: repeat macro to same row in csv file
You're not understanding my question.
I have csv file that has 6 columns and it has 3 rows of it.
Instead of manually clicking to make the whole script repeat 3 times and click on Play loop, I want it to automatically repeat as many times as there are rows in that csv file.
Re: repeat macro to same row in csv file
You know,
you could've read that page.
http://www.iopus.com/imacros/help/index ... ut_csv.htm
once again:
you could've read that page.
http://www.iopus.com/imacros/help/index ... ut_csv.htm
once again:
We then need to tell iMacros how many columns the CSV file has in each line. We do that by using the !DATASOURCE_COLUMNS variable:
SET !DATASOURCE_COLUMNS 3
This number must match the exact number of columns in the input file, even if you do not use some columns.
Since we want to insert all datasets into the form, we need to loop over the macro, each time inserting the next CD. Therefore, we need to tell iMacros in which line of the datasource we currently are. We do this using the built-in variable !DATASOURCE_LINE. By cunningly using the built-in variable !LOOP, we let iMacros take care of the counting:
SET !DATASOURCE_LINE {{!LOOP}}
Now we can have the macro fill out the online form with the values from the current CD dataset. We use the built-in variables !COLn, where n represents the number of the columns to put into the form element.
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Name CONTENT={{!COL1}}
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Album CONTENT={{!COL2}}
TAG TYPE=INPUT:TEXT FORM=Listing ATTR=NAME:Price CONTENT={{!COL3}}
During the execution of the macro, the constants in parentheses {{..}} are replaced by the value specified in the data sources.
-
- Posts: 15
- Joined: Tue Feb 23, 2010 2:06 pm
Re: repeat macro to same row in csv file
Are you saying is supposed to repeat the macro automatically?
Maybe I should explain further of how my script looks like.
I have SET !DATASOURCE_COLUMNS 9 and SET !DATASOURCE_LINE {{!LOOP}} on my script.
Throughout the script, I have {{!COL1}} ~ {{!COL9}} but only one of each.
Around the end of the script, it'll submit the value I have input from a csv file, load a new page and the script ends.
I have to manually enter 9 for the Repeat Macro option on the iMacros tab on firefox, and click on Play (Loop) so that it'll repeat 3 times and each time grabbing new line.
Code: Select all
SET !DATASOURCE_LINE {{!LOOP}}
Maybe I should explain further of how my script looks like.
I have SET !DATASOURCE_COLUMNS 9 and SET !DATASOURCE_LINE {{!LOOP}} on my script.
Throughout the script, I have {{!COL1}} ~ {{!COL9}} but only one of each.
Around the end of the script, it'll submit the value I have input from a csv file, load a new page and the script ends.
I have to manually enter 9 for the Repeat Macro option on the iMacros tab on firefox, and click on Play (Loop) so that it'll repeat 3 times and each time grabbing new line.
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: repeat macro to same row in csv file
Hello,
Best regards,
Well, there are 2 options: either you run the macro from a script which determines the amount of rows and acts accordingly. Or you set the value in "Repeat Macro | Max" to a very big value and the script will run through all the rowssuper_hiro wrote:Hi,
Is it possible to automatically make a Macro repeat as many times as the amount of rows in csv file it's grabbing data from?
So if there's 3 rows worth of data on the csv file, make it repeat 3 times?
Best regards,
Daniel, iOpus Support
-
- Posts: 15
- Joined: Tue Feb 23, 2010 2:06 pm
Re: repeat macro to same row in csv file
Could you tell me how to do both?Daniel, iOpus wrote:Well, there are 2 options: either you run the macro from a script which determines the amount of rows and acts accordingly. Or you set the value in "Repeat Macro | Max" to a very big value and the script will run through all the rows
Best regards,
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: repeat macro to same row in csv file
This is very easy - you set it and press the "Play (Loop)" button...Or you set the value in "Repeat Macro | Max"
Daniel, iOpus Support