|
发表于 2010-6-11 10:55:38
|
显示全部楼层
你可以用controlclick(),这中方式准确的多。我自己做了一个Winzip的自动安装
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\20100609090345942.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
;自动安装Winzip14.5
Opt("WinWaitDelay",100)
Run("winzip145.exe")
WinWaitActive("[CLASS:#32770;]", "Thank you for your interest in WinZip!")
ControlClick("WinZip", "Thank you for your interest in WinZip!", 1)
WinWaitActive("WinZip 14.5 Setup", "Welcome to the WinZip 14.5 Installation Wizard")
ControlClick("WinZip 14.5 Setup", "Welcome to the WinZip 14.5 Installation Wizard", 1090)
;MsgBox(0,"11","11")
WinWaitActive("WinZip 14.5 Setup", "WinZip License Agreemen")
ControlClick("WinZip 14.5 Setup", "WinZip License Agreemen", 1081)
ControlClick("WinZip 14.5 Setup", "WinZip License Agreemen", 1090)
WinWaitActive("WinZip 14.5 Setup", "Select a folder where the application will be installed")
ControlClick("WinZip 14.5 Setup", "Select a folder where the application will be installed", "[CLASS:Button; INSTANCE:1]")
WinWaitActive("WinZip 14.5 Setup", "Check the items you want installed")
ControlClick("WinZip 14.5 Setup", "Check the items you want installed", 1090)
WinWaitActive("WinZip 14.5 Setup", "Please select the default compression method for WinZip")
ControlClick("WinZip 14.5 Setup", "Please select the default compression method for WinZip", 1857)
ControlClick("WinZip 14.5 Setup", "Please select the default compression method for WinZip", 1090)
WinWaitActive("WinZip 14.5 Setup", "WinZip User Feedback")
ControlClick("WinZip 14.5 Setup", "WinZip User Feedback", "[CLASS:Button; INSTANCE:5]")
ControlClick("WinZip 14.5 Setup", "WinZip User Feedback", "[ID:1090]")
WinWaitActive("WinZip 14.5 Setup", "Click Next to begin the installation")
ControlClick("WinZip 14.5 Setup", "Click Next to begin the installation", 1088)
WinWaitActive("WinZip Setup", "Express Setup associates WinZip with archives")
ControlClick("WinZip Setup", "Express Setup associates WinZip with archives", 8102)
WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives")
ControlClick("WinZip Setup", "WinZip needs to associate itself with your archives", 8102)
WinWaitActive("WinZip 14.5 Setup", "Click the Finish button to exit this installation")
ControlClick("WinZip 14.5 Setup", "Click the Finish button to exit this installation", 165)
ControlClick("WinZip 14.5 Setup", "Click the Finish button to exit this installation", 1084)
WinWaitActive("[TITLE:WinZip; CLASS:Chrome_WidgetWin_0]")
WinClose("[TITLE:WinZip; CLASS:Chrome_WidgetWin_0]")
MsgBox(64, "", "Winzip已经安装完成。", 30) |
评分
-
查看全部评分
|