不行就加Exit
另外
WinWait($hd,"InstallShield Wizard 完成")
if not WinActivate($hd,"InstallShield Wizard 完成") then WinActivate($hd,"InstallShield Wizard 完成")
类似这两句的可以删除
留WinWaitActive($hd,"InstallShield Wizard 完成")就可以了
修改后代码,你试试能否顺利运行并退出?
Run('H3C.exe')
$hd="H3C 802.1X 客户端 - InstallShield Wizard"
WinWaitActive($hd,"欢迎使用 H3C 802.1X 客户端 InstallShield Wizard")
ControlClick($hd,"欢迎使用 H3C 802.1X 客户端 InstallShield Wizard","Button1")
Send("!n")
WinWaitActive($hd,"许可协议")
ControlClick($hd,"许可协议","Button5")
Send("!n")
WinWaitActive($hd,"客户信息")
ControlSetText($hd,"客户信息","Edit1","PC0624");这里修改下
ControlSetText($hd,"客户信息","Edit2","pc0624");没必要ControlSend再ControlSetText
Send("!n")
WinWaitActive($hd,"安装类型")
ControlClick($hd,"安装类型","Button4")
Send("!n")
WinWaitActive($hd,"可以安装该程序了")
ControlClick($hd,"可以安装该程序了","Button1")
Send("{enter}")
WinWaitActive($hd,"InstallShield Wizard 完成")
ControlClick($hd,"InstallShield Wizard 完成","Button2")
WinWaitActive($hd,"InstallShield Wizard 完成");如果Exit不行试试加这句
Send("{enter}")
[ 本帖最后由 lynfr8 于 2009-4-19 22:00 编辑 ] |