全新的编码和imacros。
我在使用LOOP在iMacros中的CSV文件(address.csv)中前进时遇到了问题。我有以下简单的CSV:列A是URL,列B是文件名。
我想:
使用以下代码,我能够获得第2行中的第一张图像,但无法前进到第3,4,5行以获取其余文件。任何建议将不胜感激!
这是我尝试使用演示和我记录的宏一起破解的代码:
VERSION BUILD=10.4.28.1074
'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database
TAB T=1
TAB CLOSEALLOTHERS
' 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
'Start at line 2 to skip the header in the file
SET !DATASOURCE_COLUMNS 2
SET !LOOP 2
'Increase the current position in the file with each loop
SET !DATASOURCE_LINE {{!LOOP}}
VERSION BUILD=8340723 RECORDER=CR
URL GOTO={{!COL1}}
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAG POS=1 TYPE=BUTTON FORM=ACTION:/download-photo/{{!COL2}} ATTR=TXT:Download<SP>hi-res<SP>photo
TAG POS=1 TYPE=A ATTR=TXT:*Back*
答案 0 :(得分:0)
得到了答案;这是宏
VERSION BUILD=10.4.28.1074
SET !ERRORIGNORE YES
TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE Address.csv
SET !DATASOURCE_COLUMNS 2
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO={{!COL1}}
WAIT SECONDS=1
ONDOWNLOAD FOLDER=* FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
TAG POS=1 TYPE=BUTTON FORM=ACTION:/download-photo/{{!COL2}} ATTR=TXT:Download<SP>hi-res<SP>photo
WAIT SECONDS=2