Page 1 of 1

CSV Data Filling Question

Posted: Tue Jan 20, 2009 10:59 pm
by kstufff
Ok. Is there anyway I can have a looped script that will submit data to a form lets say 10 times from a .CSV file, then a new command happens after the 10th form submit. So the loop would be data from lines 1-10 form submits, command, data from 11-20 form submits, command, etc.

Thanks!

Re: CSV Data Filling Question

Posted: Wed Jan 21, 2009 4:37 am
by dharmendra2000
You can use Java Script for Looping

MyScript.js

Code: Select all

for(x=1;x<10;x++)
{
iimSet("xloop",x)
iimPlay("MyMacro.iim")
}
MyMacro.iim

Code: Select all

VERSION BUILD=6111213 RECORDER=FX
TAB T=1
SET !DATASOURCE MyCSVfile.csv
SET !DATASOURCE_LINE {{xloop}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=NAME:q CONTENT={{!COL1}}
Here you can update your code as per your requirement, in above case you can replace code(TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:f ATTR=NAME:q CONTENT=) with your code.

If more details are required, get back :)