Contoh kode iim :
VERSION BUILD=8920312 RECORDER=FX
'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database
'
'Open tab 1
TAB T=1
'
' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file
'CSV = Comma Separated Values in each line of the file
SET !DATASOURCE Address.csv
'
URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
WAIT SECONDS=3
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:fname CONTENT={{!COL1}}
WAIT SECONDS=3
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:lname CONTENT={{!COL1}}
WAIT SECONDS=3
SET !LOOP 3
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:address CONTENT={{!COL1}}
WAIT SECONDS=3
SET !LOOP 4
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:city CONTENT={{!COL1}}
WAIT SECONDS=3
SET !LOOP 5
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:zip CONTENT={{!COL1}}
WAIT SECONDS=3
'
'Note * is used to ignore leading and trailing blanks that could be in the input data
'
'The precent (%) symbol is used to select the stateid by VALUE as defined in the website select statement and not by its index.
SET !LOOP 6
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:state CONTENT=$*{{!COL1}}*
WAIT SECONDS=3
'
'The string ($) symbol is used to select the country by TEXT, not by its index.
'Index would be the position of an entry in the combo box list, e. g. 161 for United States
SET !LOOP 7
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:country CONTENT=$*{{!COL1}}*
WAIT SECONDS=3
'
SET !LOOP 8
SET !DATASOURCE_LINE {{!LOOP}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:email CONTENT={{!COL1}}
WAIT SECONDS=3
TAG POS=1 TYPE=BUTTON:submit FORM=ID:demo ATTR=TXT:Submit
WAIT SECONDS=15
TAG POS=1 TYPE=A ATTR=TXT:*Back*
Contoh Adress.csv :
satu |
dua |
tiga |
empat |
lima |
Alabama |
Afghanistan |
delapan |
Selamat mencoba..!!
ConversionConversion EmoticonEmoticon