Reading from text file __undefined__

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
Paulie
Posts: 1
Joined: Thu Dec 09, 2010 10:04 am

Reading from text file __undefined__

Post by Paulie » Thu Dec 09, 2010 10:13 am

I'm trying to read from a text file and then enter the data into a form on a website. All I get is the __undefined__ entries in the fields

macro file

Code: Select all

VERSION BUILD=7031111
SET !DATASOURCE /home/paulie/iMacros/Datasources/Profile.txt
SET !DATASOURCE_COLUMNS 1 
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=http://www.somepage.com
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:email.php ATTR=NAME:email CONTENT={{email}}
Profile.txt

Code: Select all

[iOpus] 
email=emailtest 
and a nice little error in the console

Code: Select all

BŁĄD: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getCharPref]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://imacros/content/utils.js :: anonymous :: line 1"  data: no]
Plik źródłowy: chrome://imacros/content/utils.js
Wiersz: 1
yquant
Posts: 19
Joined: Tue Nov 16, 2010 10:00 am

Re: Reading from text file __undefined__

Post by yquant » Thu Dec 09, 2010 1:09 pm

Hi there, i think your problem is that
Currently iMacros can read data sources files only in CSV format.
Source:
http://wiki.imacros.net/!DATASOURCE
siniy
Posts: 118
Joined: Sat Nov 07, 2009 7:44 pm

Re: Reading from text file __undefined__

Post by siniy » Fri Dec 10, 2010 1:55 am

I don't know where you saw such example of datasource usage. This is how it supposed to work.

Code: Select all

VERSION BUILD=7031111
SET !DATASOURCE /home/paulie/iMacros/Datasources/Profile.txt
SET !DATASOURCE_COLUMNS 1
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=http://www.somepage.com
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:email.php ATTR=NAME:email CONTENT={{!COL1}}
Profile.txt

Code: Select all

Email
mail@mail.com
Tom, Tech Support
Posts: 3522
Joined: Mon May 31, 2010 4:59 pm

Re: Reading from text file __undefined__

Post by Tom, Tech Support » Mon Dec 13, 2010 2:16 pm

Hello,

The iMacros Browser and iMacros for IE used to support input from a list of variables file (prior to version 7). However, this format is no longer supported in current versions and was never supported in iMacros for Firefox.
Regards,

Tom, iMacros Support
i_macro_user
Posts: 76
Joined: Sun Dec 02, 2012 5:28 pm

Re: Reading from text file __undefined__

Post by i_macro_user » Tue Oct 29, 2013 4:45 pm

Hallo

how must I write

SET !DATASOURCE c:\das ist ein Testverzeichnis\hier liegt die Datei.csv

no solution

SET !DATASOURCE "c:\das ist ein Testverzeichnis\hier liegt die Datei.csv"
SET !DATASOURCE 'c:\das ist ein Testverzeichnis\hier liegt die Datei.csv'

Best regards
Hum ... Only professional answers are helpful
Hum ... No complete quotations - limit to the essentials
Hum ... Can we get along in this forum without personal attacks?
Hum ... I use automatic translations
Yes ... I am iMacros beginners :-)
User avatar
bobis
Posts: 364
Joined: Sat Sep 11, 2010 3:34 pm
Contact:

Re: Reading from text file __undefined__

Post by bobis » Tue Oct 29, 2013 6:19 pm

i_macro_user wrote:Hallo

how must I write

SET !DATASOURCE c:\das ist ein Testverzeichnis\hier liegt die Datei.csv

no solution

SET !DATASOURCE "c:\das ist ein Testverzeichnis\hier liegt die Datei.csv"
SET !DATASOURCE 'c:\das ist ein Testverzeichnis\hier liegt die Datei.csv'

Best regards

Code: Select all

SET !DATASOURCE c:\das<sp>ist<sp>ein<sp>Testverzeichnis\hier<sp>liegt<sp>die<sp>Datei.csv
Get Best iMacros scripts at http://imacrosbot.com/
i_macro_user
Posts: 76
Joined: Sun Dec 02, 2012 5:28 pm

Re: Reading from text file __undefined__

Post by i_macro_user » Tue Oct 29, 2013 7:16 pm

I was afraid of it, and I press all the users fingers crossed that it is sufficient in the future to put strings with spaces in quotes.
Hum ... Only professional answers are helpful
Hum ... No complete quotations - limit to the essentials
Hum ... Can we get along in this forum without personal attacks?
Hum ... I use automatic translations
Yes ... I am iMacros beginners :-)
Post Reply