Opt("MouseCoordMode", 0);相对激活窗口的坐标
Opt("WinTitleMatchMode", 2);标题的任意子串皆可匹配
Dim $bt = "福昕阅读器安装向导"
Dim $txt1 = "否(&N)"
Dim $txt2 = "PDF文档"
Dim $txt3 = "许可协议"
Dim $txt4 = "选择您需要的安装方式"
Dim $txt5 = "安装位置"
Dim $txt6 = "安装Firefox插"
Dim $txt7 = "通过设置安全阅读模式"
Dim $txt8 = "百度工具栏"
Dim $txt9 = "安装佳印名片设计器"
Dim $txt10 = "目标位置:"
Dim $txt11 = "查看新特性"
If Not FileExists(@ScriptDir&"\FoxitReader4.3.exe") Then
TrayTip("错误!!","安装文件未找到!"&@CRLF&"5秒后自动退出", 15, 4)
Sleep(5000)
Exit
EndIf
ProcessClose("360tray.exe")
Run(@ScriptDir&"\FoxitReader4.3.exe");运行软件
TrayTip("温馨提示", "自动安装期间为避免操作失败,请勿动键盘鼠标", 15, 4)
Sleep(1000)
Do
Sleep(1000)
If WinExists($bt,$txt1)Then
WinWaitActive($bt,$txt1)
ControlClick($bt,$txt1, "Button1")
EndIf
Until WinExists($bt, $txt2)
WinWaitActive($bt, $txt2)
ControlClick($bt, $txt2, "Button2")
ControlClick($bt, $txt2, "Button2")
WinWaitActive($bt, $txt3)
ControlClick($bt, $txt3, "Button1")
ControlClick($bt, $txt3, "Button3")
WinWaitActive($bt, $txt4)
ControlClick($bt, $txt4, "Button3")
WinWaitActive($bt, $txt5)
ControlClick($bt, $txt5, "Button8")
ControlClick($bt, $txt5, "Button8")
WinWaitActive($bt, $txt6)
ControlClick($bt, $txt6, "Button4")
ControlClick($bt, $txt6, "Button6")
ControlClick($bt, $txt6, "Button15")
WinWaitActive($bt, $txt7)
ControlClick($bt, $txt7, "Button17")
WinWaitActive($bt, $txt8)
ControlClick($bt, $txt8, "Button1")
ControlClick($bt, $txt8, "Button18")
WinWaitActive($bt, $txt9)
ControlClick($bt, $txt9, "Button1")
ControlClick($bt, $txt9, "Button19")
WinWaitActive($bt, $txt10)
ControlClick($bt, $txt10, "Button19")
WinWaitActive($bt, $txt11)
ControlClick($bt, $txt11, "Button1")
ControlClick($bt, $txt11, "Button5")
ControlClick($bt, $txt11, "Button26")
TrayTip(" 恭喜!", "已经安装完成,谢谢使用", 5, 4)
Sleep(2000)
ProcessExists("360chrome.exe")
ProcessClose("iexplore.exe")
ProcessClose("115br.exe")
ProcessClose("360se.exe")
Exit