Datasource


SUBMITTED BY: rilp44

DATE: Dec. 6, 2015, 10:01 a.m.

FORMAT: Text only

SIZE: 1.7 kB

HITS: 4693

  1. VERSION BUILD=8920312 RECORDER=FX
  2. 'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database
  3. TAB T=1
  4. ' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file
  5. 'CSV = Comma Separated Values in each line of the file
  6. SET !DATASOURCE Address.csv
  7. 'SET !DATASOURCE_COLUMNS 8
  8. 'Start at line 2 to skip the header in the file
  9. SET !LOOP 2
  10. 'Increase the current position in the file with each loop
  11. SET !DATASOURCE_LINE {{!LOOP}}
  12. ' Fill web form
  13. URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
  14. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:fname CONTENT={{!COL1}}
  15. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:lname CONTENT={{!COL2}}
  16. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:address CONTENT={{!COL3}}
  17. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:city CONTENT={{!COL4}}
  18. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:zip CONTENT={{!COL5}}
  19. '
  20. 'Note * is used to ignore leading and trailing blanks that could be in the input data
  21. '
  22. 'The precent (%) symbol is used to select the stateid by VALUE as defined in the website select statement and not by its index.
  23. TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:state CONTENT=$*{{!COL6}}*
  24. '
  25. 'The string ($) symbol is used to select the country by TEXT, not by its index.
  26. 'Index would be the position of an entry in the combo box list, e. g. 161 for United States
  27. TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:country CONTENT=$*{{!COL7}}*
  28. '
  29. TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:email CONTENT={{!COL8}}
  30. TAG POS=1 TYPE=BUTTON:submit FORM=ID:demo ATTR=TXT:Submit
  31. TAG POS=1 TYPE=A ATTR=TXT:*Back*

comments powered by Disqus