Load path from csv-file?

190 views
Skip to first unread message

mh

unread,
Apr 24, 2012, 7:13:45 AM4/24/12
to Fake
Hi guys,

I really love fakeapp, its amazing.
But right now I run into a problem:

I have an form with a "Choose File" and "Upload" - Button to upload an
image.
The path to the Image comes from an external csv-file.
I added a "set value of html element" and connected it with the
"Choose File"- Button.
What I want now, is to get the path for the image from csv-file (e.g.
line 2, column 2)
I think it could be handle with "Apple Script" or "Do JavaScript", but
I'm not able to do this :(

After I got this, I would add a "click html element" connected to the
"upload" button.

Can you give me an easy example to load a path from a csvfile.

Thanks at all.
mh

Todd Ditchendorf

unread,
Apr 24, 2012, 12:20:27 PM4/24/12
to fak...@googlegroups.com
thanks mh. glad you like Fake :)

here's an example of loading a value from row 2, column 2 from a CSV file and inserting the value into a File Upload element:



TD

mh

unread,
May 4, 2012, 4:42:20 AM5/4/12
to fak...@googlegroups.com
hi, 

thx for your help.
if I try to run your code, I got this massage:

Error while running Workflow. JavaScript syntax error: SyntaxError: Invalid character  '\u0027'

My code looks exactly like yours:
 
if (fake.loop.index == 1) {
var line = fake.get('line');
var val = line.split(',') [1];
fake.set('val', val);
fake.loop.exit();
}

Hope you can help me. Thx.
Reply all
Reply to author
Forward
0 new messages