coming from CSV

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
eternos
Posts: 16
Joined: Mon Jan 22, 2007 11:36 am

coming from CSV

Post by eternos » Thu Feb 01, 2007 11:23 am

hello,
is it possible to use the content of a csv file's column in this case:

TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:miformulario ATTR=NAME:rightOption&&VALUE:{{!COL6}}

imacros stops at this point.. in the previous line i have:

TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:option3 CONTENT={{!COL5}}

and there is not a problem with it

may i use {{!COL6}} in any other different way so that i can achieve this


TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:miformulario ATTR=NAME:rightOption&&VALUE:2

TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:miformulario ATTR=NAME:rightOption&&VALUE:1

TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:miformulario ATTR=NAME:rightOption&&VALUE:3

where 2, 1, 3 are the values in my csv

thanks!
Hannes, Tech Support

Post by Hannes, Tech Support » Thu Feb 01, 2007 11:44 am

Hi,

do you use the 5.22? It should not have a restriction concerning the numer of columns. Did you set !DATASOURCE_COLUMNS to 6?

Perhaps you could post the macro here?


Hannes
eternos
Posts: 16
Joined: Mon Jan 22, 2007 11:36 am

...

Post by eternos » Thu Feb 01, 2007 4:02 pm

i'm using last imacro's version for firefox and SET !DATASOURCE_COLUMNS 6

is there any problem with firefox add-on?
eternos
Posts: 16
Joined: Mon Jan 22, 2007 11:36 am

Post by eternos » Thu Feb 01, 2007 4:04 pm

the macro in case it is helpful...

VERSION BUILD=5200814 RECORDER=FF
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://proyectos-programas.com/elearnin ... r36flyqhpg
TAG POS=1 TYPE=IMG ATTR=ID:iconoautoevaluacion

CMDLINE !DATASOURCE dataauto.csv

SET !DATASOURCE_COLUMNS 6

SET !DATASOURCE_LINE 1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:controller.jsp ATTR=NAME:name CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=ACTION:controller.jsp ATTR=ID:introducir

TAG POS=1 TYPE=TEXTAREA FORM=NAME:addQuizForm ATTR=NAME:intro CONTENT=Esta<SP>autoevaluación<SP>la<SP>puedes<SP>realizar<SP>cuantas<SP>veces<SP>quieras.<SP>Al<SP>terminar<SP>la<SP>aplicación<SP>te<SP>dará<SP>las<SP>respuestas<SP>correctas.<SP>¡¡¡¡Ánimo!!!
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:addQuizForm ATTR=ID:introducir

SET !DATASOURCE_LINE 2
TAG POS=1 TYPE=IMG ATTR=ID:flecha
TAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:/elearningsystem/autoexam/addQuestion1.jsp ATTR=NAME:questionType&&VALUE:2
TAG POS=1 TYPE=INPUT:IMAGE FORM=ACTION:/elearningsystem/autoexam/addQuestion1.jsp ATTR=ID:flecha
TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:question CONTENT={{!COL1}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:option0 CONTENT={{!COL2}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:option1 CONTENT={{!COL3}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:option2 CONTENT={{!COL4}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:miformulario ATTR=NAME:option3 CONTENT={{!COL5}}
TAG POS=1 TYPE=INPUT:RADIO FORM=NAME:miformulario ATTR=NAME:rightOption&&VALUE:{{!COL6}}
TAG POS=1 TYPE=INPUT:IMAGE FORM=NAME:miformulario ATTR=ID:introducir
Hannes, Tech Support

Post by Hannes, Tech Support » Fri Feb 02, 2007 2:43 pm

Somehow, I could not test your macro, but I tried with the following:

Code: Select all

dataauto.csv:
------------------
1, 2, 3, 4, 5, 6, 7
11, 22, 33, 44, 55, 66, 77

Macro:
-----------
VERSION BUILD=5200814 RECORDER=FF
TAB T=1
TAB CLOSEALLOTHERS
CMDLINE !DATASOURCE dataauto.csv
SET !DATASOURCE_COLUMNS 6
SET !DATASOURCE_LINE 1
URL GOTO=http://amazon.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL5}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL6}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:site-search ATTR=ID:twotabsearchtextbox CONTENT={{!COL7}}
There indeed is something strange: the macro takes only the first six values, and ignores the seventh. That's probably what causes your troubles: Try adding a seventh entry, this might make the no. 6 importable.

Additionally, the plugin started with the second line of input.

I will pass both errors to the dev team.


Thanks for your report!


Hannes
Korax
Posts: 5
Joined: Wed Jun 13, 2007 7:48 pm

Post by Korax » Mon Jun 25, 2007 8:34 pm

How is it possible to make Firefox read in variables with commas in them? Quotes don't work, and are interpreted as part of the incoming String.
Hannes, Tech Support

Post by Hannes, Tech Support » Fri Jun 29, 2007 3:24 pm

Well, as CSV means "Comma Separated Values", every comma is interpreted as separating two fields. You will need to find a way to get rid of them. Perhaps there is a way to identify the "real" commas, then change them to something else (#COMMA#), then change the in-field commas to a replacement (like "." or ";") and revert the #COMMA# to commas again?


Hannes
Post Reply