本帖最后由 绿色风 于 2011-10-31 03:08 编辑
#include <GuiTreeView.au3>
Run('Thunder5.9.21.1442.exe')
$del = WinWaitActive ("迅雷5 : 用户使用协议","")
ControlClick ($del,"","Button2")
WinWaitActive ($del,"上一步")
ControlSend ($del,"","Button6","{tab}")
ControlSetText ($del,"","","c:\迅雷")
;SysTreeView321 的操作
Dim $h[5],$l,$av
$h[0] = "安装迅雷看看播放器"
$h[1] = "将迅雷设置为默认下载工具"
$h[2] = "为迅雷添加桌面快捷方式"
$h[3] = "迅雷5默认开机自动启动"
$h[4] = "为迅雷5添加快速启动栏图标"
For $l = 0 To 4 Step 1
$av =$h[$l]
$del1 = ControlGetHandle ($del,"","SysTreeView321")
$del2 = _GUICtrlTreeView_FindItem ($del1,$av)
_GUICtrlTreeView_setChecked ($del1,$del2,False)
Next
WinWaitActive ("迅雷5: 安装选项","")
ControlClick ("迅雷5: 安装选项","","Button2")
If WinWaitActive ("迅雷5","确定") Then
ControlClick ("迅雷5","确定","Button1")
EndIf
$bd = WinWaitActive ("安装:迅雷5","安装百度工具栏")
$bd1 = ControlGetHandle ($bd,"安装百度工具栏","Button4")
ControlCommand ($bd1,"安装百度工具栏","","uncheck")
ControlClick ("安装:迅雷5","安装百度工具栏","Button2")
$qd = WinWaitActive("迅雷5: 安装完成","启动迅雷5")
$qd1 = ControlGetHandle ($qd,"启动迅雷5","Button5")
ControlCommand ($qd1,"启动迅雷5","","uncheck")
$qd1 = ControlGetHandle ($qd,"启动迅雷5","Button6")
ControlCommand ($qd1,"将迅雷看看设为首页","","uncheck")
ControlClick ($qd,"","Button2")
If WinWaitActive ("祝贺您成功安装迅雷 - Microsoft Interne","") Then
ControlSend ("祝贺您成功安装迅雷 - Microsoft Interne","","","!{f4}")
EndIf
;不足之处,大家请指导一下。
|