Post date: Feb 11, 2015 11:23:38 AM
Перевіріяє стан ділянок по списку, результат зберігає в файл.
SET !EXTRACT_TEST_POPUP NO
VERSION BUILD=7500718 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'The name of file to store the extracted information is specified with the FILE= attribute of the SAVEAS command
'The FOLDER=* attribute indicates that the default folder is used. You can specify another folder with FOLDER=c:\yourfolder
'URL GOTO=https://localhost/ex/rrpdzk
'SET !LOOP 2
'
'Note: This macro can run the iMacros Browser, Firefox and the IE-Plugin
'But the EXTRACT button to start the extraction wizard is only in the IM Browser
'
'
'The first table is the list of currencies
'=> Extract data of **2nd** table (POS=2) on page
' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file. CSV must be in UTF-8. CSV must be plased in c:\Users\orso8899\Documents\iMacros\Datasources\cad.csv
'CSV = Comma Separated Values in each line of the file
SET !DATASOURCE cad.csv
SET !DATASOURCE_COLUMNS 1
'Start at line 2 to skip the header in the file
SET !LOOP 2
'Increase the current position in the file with each loop
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=https://localhost/ex/parcels
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/ex/parcels ATTR=NAME:cad_num CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/ex/parcels ATTR=ID:save
WAIT SECONDS=0.5
TAG POS=1 TYPE=TABLE ATTR=* EXTRACT=TXT
'The SAVEAS statement was added manually to write the extracted table to a file
'(The alternative way to get the extracted data is the Scripting Interface)
SAVEAS TYPE=EXTRACT FOLDER=* FILE=test1.txt
'TAG POS=1 TYPE=A ATTR=TXT:{{!LOOP}}