PROMPT for DATASOURCE workaround

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
opal29
Posts: 2
Joined: Tue Jul 13, 2010 3:36 am

PROMPT for DATASOURCE workaround

Post by opal29 » Tue Jul 13, 2010 3:46 am

What I'm trying to achieve: Use PROMPT to determine how to to fill out a web form.

For example: If you enter 1, then the form is filled out:
color = x
height = y
length = z

However, If enter 2, then the form is filled out:
color = a
height = b
length = c

Here is what I have written:

Code: Select all

VERSION BUILD=1110311 RECORDER=CR
PROMPT set: !VAR1
SET !DATASOURCE H:\datasources\{{!VAR}}.csv
SET !DATASOURCE_COLUMNS 3 
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:color CONTENT={{!COL1}} 
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:height CONTENT={{!COL2}} 
TAG POS=1 TYPE=SELECT FORM=NAME:changeform ATTR=NAME:length CONTENT={{!COL3}} 
However, I have learned that PROMPT and DATASOURCE don't work together.

Any suggestions for workarounds?
Tom, Tech Support
Posts: 3414
Joined: Mon May 31, 2010 4:59 pm

Re: PROMPT for DATASOURCE workaround

Post by Tom, Tech Support » Wed Jul 14, 2010 12:36 pm

Hi opal,

You have a mistake on the SET !DATASOURCE line: You're referencing !VAR instead of !VAR1. Change it to:

Code: Select all

SET !DATASOURCE H:\datasources\{{!VAR1}}.csv
Regards,

Tom, iMacros Support
opal29
Posts: 2
Joined: Tue Jul 13, 2010 3:36 am

Re: PROMPT for DATASOURCE workaround

Post by opal29 » Wed Jul 14, 2010 4:58 pm

[quote="Tom, iOpus"]Hi opal,

You have a mistake on the SET !DATASOURCE line: You're referencing !VAR instead of !VAR1. Change it to:

I had actually caught that typo and unfortunately it does not fix it. From the wiki, it seems like you can't use a variable in the DATASOURCE line.
Tom, Tech Support
Posts: 3414
Joined: Mon May 31, 2010 4:59 pm

Re: PROMPT for DATASOURCE workaround

Post by Tom, Tech Support » Wed Jul 14, 2010 5:09 pm

Hmmmm... well I tried this in iMacros for Firefox and the iMacros Browser and it works. It may be that this is not yet supported in iMacros for Chrome. Let me see what I can find out from the Chrome development team.

Update: Support for File I/O is not yet implemented in iMacros for Chrome due to Chrome API limitations.
Regards,

Tom, iMacros Support
Post Reply