Simple Form Filling (from CSV) Problem

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
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
cbaarck
Posts: 3
Joined: Fri Feb 03, 2012 1:38 pm

Simple Form Filling (from CSV) Problem

Post by cbaarck » Fri Feb 03, 2012 1:44 pm

I'm trying to input data from a *.csv file (1 column).
The data range is quite large, however, which means I need to have the macro able to carry out a flexible range of data.
And that seems to be the problem.

Code: Select all

VERSION BUILD=7401110 RECORDER=FX
TAB T=1
SET !DATASOURCE C:\csv.csv
SET !DATASOURCE_COLUMNS 99
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:ManualProductEntry ATTR=NAME:pn0 CONTENT={{!COL1}}
The form names would be pn0, pn1, etc - how do I tell iMacros to allow this range to continue without copy/pasting lines 200 times over?
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: Simple Form Filling (from CSV) Problem

Post by skippyto » Fri Feb 03, 2012 5:29 pm

If you CSV file contain just one column, why do you set the number of column to 99 ?
If think you should replace by "SET !DATASOURCE_COLUMNS 1".

Then I see two solutions for your problem :

Code: Select all

TAG POS={{!LOOP}} TYPE=INPUT:TEXT FORM=NAME:ManualProductEntry ATTR=NAME:pn* CONTENT={{!COL1}}
or

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:ManualProductEntry ATTR=NAME:pn{{!LOOP}} CONTENT={{!COL1}}
Hope this help !

Skippyto
cbaarck
Posts: 3
Joined: Fri Feb 03, 2012 1:38 pm

Re: Simple Form Filling (from CSV) Problem

Post by cbaarck » Fri Feb 03, 2012 6:59 pm

Thanks for the response, but I'm still receiving a problem:
It currently inputs, at a very fast rate, the data entries only into the first form (pn0) and the others are ignored.
When I use ATTR=NAME:pn{{!LOOP}} it inputs the data into all 4 forms, but subsequently leaves them empty after each "frame" or "tick" before it moves onto the next.
What am I doing wrong here?


The csv.csv file looks like this (for example):

Code: Select all

"1"
"2"
"3"
"4"
"5"
Last edited by cbaarck on Fri Feb 03, 2012 7:25 pm, edited 1 time in total.
cbaarck
Posts: 3
Joined: Fri Feb 03, 2012 1:38 pm

Re: Simple Form Filling (from CSV) Problem

Post by cbaarck » Fri Feb 03, 2012 7:15 pm

I tried using

Code: Select all

POS={{!LOOP}}
but it's deleting (or it appears to be) the entries after inputting them.

The macro itself is doing exactly what I want to be doing - but it seems to be removing/deleting previous entries if it has another action to do. So if I max the loop to 4 it will correctly have that data in 4, but the former 3 entries will be empty (although they were just entered by the macro). Only one data entry is visible at a time during this process.

Why is this?
skippyto
Posts: 108
Joined: Wed Aug 20, 2008 8:14 am

Re: Simple Form Filling (from CSV) Problem

Post by skippyto » Wed Feb 15, 2012 10:04 am

Do you use commands such as REFRESH or URL GOTO in you loop ?

It looks like your page refreshs while you are filing your form.

Skippyto.
Post Reply