Imacro Auto Downloader(IF THEN)

时间:2016-06-08 09:08:16

标签: javascript java imacros

大家好,她是我代码的一部分。

我想从东芝方面下载超过20台笔记本电脑的驱动程序。那么20 * 3 + X驱动程序,所以我为它写宏。 IT运行良好,但我需要一些帮助来实现IF语句,有时每个站点有很多驱动程序,所以有时没有操作系统的驱动程序。

VERSION BUILD=8970419 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACTDIALOG NO
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE ToshibaTreiber1.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
'Windows 7 - 64 Bit - TAG POS=1 TYPE=SELECT FORM=ID:downloadForm ATTR=ID:dp.osId CONTENT=%30
'WINDOWS 8.1 64 Bit - TAG POS=1 TYPE=SELECT FORM=ID:downloadForm ATTR=ID:dp.osId CONTENT=%46
'WINDOWS 10 64  Bit - TAG POS=1 TYPE=SELECT FORM=ID:downloadForm ATTR=ID:dp.osId CONTENT=%61
'{{!COL1}}
URL GOTO=http://www.toshiba.de/support/laptops/
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:smpToolForm ATTR=ID:serialNo CONTENT={{!COL1}}
WAIT SECONDS=5
TAG POS=1 TYPE=BUTTON FORM=ID:smpToolForm ATTR=TXT:Start
WAIT SECONDS=5
TAG POS=1 TYPE=A ATTR=TXT:Treiber<SP>herunterladen
WAIT SECONDS=5
TAG POS=1 TYPE=SELECT FORM=ID:downloadForm ATTR=ID:dp.osId CONTENT=%30
WAIT SECONDS=5
TAG POS=1 TYPE=SELECT FORM=ID:downloadForm ATTR=ID:dp.countryId CONTENT=%41
WAIT SECONDS=5
TAG POS=1 TYPE=BUTTON FORM=ID:downloadForm ATTR=ID:searchBtn
WAIT SECONDS=15
ONDOWNLOAD FOLDER={{!COL2}} FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=NO
TAG POS=2 TYPE=BUTTON ATTR=TXT:Download
TAB T=1
TAB CLOSEALLOTHERS
TAG POS=1 TYPE=A ATTR=TXT:2

我喜欢的是

**IF TAG POS=2 TYPE=BUTTON ATTR=TXT:Download 
THEN**
ONDOWNLOAD FOLDER={{!COL2}} FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=NO
TAG POS=2 TYPE=BUTTON ATTR=TXT:Download
TAB T=1
TAB CLOSEALLOTHERS
**NEXT STEP**
**IF TAG POS=1 TYPE=A ATTR=TXT:2
THEN**
TAG POS=1 TYPE=A ATTR=TXT:2
**NEXT STEP**

0 个答案:

没有答案