本帖最后由 bearpc 于 2010-1-4 09:45 编辑
问题:执行自动化到最后一步,如上图,需要手动点击该窗口,才能继续自动化操作,不知有何解决方法?
软件:KMPlayer中文版 2009 Release
AU3代码:Run("kmplayer2009.exe")
$hd="KMPlayer中文版 2009 Release 安装"
TrayTip( "正在安装KMPlayer中文版 2009 Release","安装过程中请不要执行任何操作,否则程序无法自动安装",10,1)
WinWait($hd,"欢迎使用")
WinWaitActive($hd,"欢迎使用")
ControlClick($hd,"","Button2")
WinWait($hd,"许可证协议")
WinWaitActive($hd,"许可证协议")
ControlClick($hd,"","Button2")
WinWait($hd,"百度工具栏")
WinWaitActive($hd,"百度工具栏")
ControlClick($hd,"百度工具栏","Button4")
ControlClick($hd,"百度工具栏","Button2")
WinWait($hd,"选择安装位置")
WinWaitActive($hd,"选择安装位置")
ControlClick($hd,"","Button2")
WinWait("The KMPlayer Wizard","")
WinWaitActive("The KMPlayer Wizard","")
Send("!a")
Sleep(800)
If ProcessExists("iexplore.exe") Then
ProcessClose("iexplore.exe")
EndIf
WinWaitActive($hd,"正在完成")
ControlClick($hd,"","Button4")
ControlClick($hd,"","Button2")
下面为正确代码:Run("kmplayer2009.exe")
$hd="KMPlayer中文版 2009 Release 安装"
TrayTip( "正在安装KMPlayer中文版 2009 Release","安装过程中请不要执行任何操作,否则程序无法自动安装",10,1)
WinWait($hd,"欢迎使用")
WinWaitActive($hd,"欢迎使用")
ControlClick($hd,"","Button2")
WinWait($hd,"许可证协议")
WinWaitActive($hd,"许可证协议")
ControlClick($hd,"","Button2")
WinWait($hd,"百度工具栏")
WinWaitActive($hd,"百度工具栏")
ControlClick($hd,"百度工具栏","Button4")
ControlClick($hd,"百度工具栏","Button2")
WinWait($hd,"选择安装位置")
WinWaitActive($hd,"选择安装位置")
ControlClick($hd,"","Button2")
WinWait("The KMPlayer Wizard","")
WinWaitActive("The KMPlayer Wizard","")
Send("!a")
Sleep(800)
If ProcessExists("iexplore.exe") Then
ProcessClose("iexplore.exe")
EndIf
ControlCommand ($hd,"运行 KMPlayer中文版","Button4","UnCheck" )
ControlClick($hd,"","Button2")
|