;--------------------------------------------------------------;脚本开始
Opt("TrayIconDebug", 1) ;0=无信息, 1=调试信息
Opt("WinTextMatchMode", 2) ;1=完全匹配, 2=快速匹配
Opt("WinTitleMatchMode", 4) ;1=开头, 2=子串, 3=完全, 4=高级
Opt("WinSearchChildren", 1) ;0=不搜索, 1=搜索子窗口
Opt("WinDetectHiddenText", 1) ;0=不检测, 1=检测
;--------------------------------------------------------------;设置脚本参数
$WinTitle_1= '安装 - 酷狗音乐'
$Wintxt_1= '下一步(&N) >'
$Wintxt_2= '许可协议'
$Wintxt_3= '选择目标位置'
$Wintxt_4= '下一步(&N) >'
$Wintxt_5= '酷狗音乐 安装完毕'
;--------------------------------------------------------------;窗口元素变量声明
$Exe = 'kugou_1182.exe'
If ProcessExists($Exe) Then ProcessClose($Exe)
If Run($Exe) = 0 Then ShellExecute($Exe)
Do
Sleep(10);
Until WinExists($Wintitle_1)
;WinMove($Wintitle_1, "", -1000, -1000)
;--------------------------------------------------------------;程序启动,显示界面
WinWaitActive($Wintitle_1, $Wintxt_1);
WinSetOnTop ($Wintitle_1,"",1)
ControlClick($Wintitle_1, $Wintxt_1, "TNewButton1");---------------;点击按钮控件: 下一步(&N) >
WinWaitActive($Wintitle_1, $Wintxt_2);
ControlClick($Wintitle_1, $Wintxt_2, "TNewButton2");---------------;点击按钮控件: 下一步(&N) >
WinWaitActive($Wintitle_1, $Wintxt_3);
ControlClick($Wintitle_1, $Wintxt_3, "TNewButton3");---------------;点击按钮控件: 安装(&I) >
WinWaitActive($Wintitle_1, "酷狗音乐推荐安装软件");
Sleep(200)
ControlClick($Wintitle_1, "酷狗音乐推荐安装软件", "TNewCheckListBox1","left",1,10,13);---------------;点击列表控件相对位置
Sleep(200)
ControlClick($Wintitle_1, "酷狗音乐推荐安装软件", "TNewCheckListBox1","left",1,10,39);---------------;点击列表控件相对位置
Sleep(200)
ControlClick($Wintitle_1, $Wintxt_4, "TNewButton3")
WinWaitActive($Wintitle_1, $Wintxt_5);
Sleep(200)
ControlClick($Wintitle_1, $Wintxt_5, "TNewCheckListBox1","left",1,8,9);---------------;点击列表控件相对位置
Sleep(200)
ControlClick($Wintitle_1, $Wintxt_5, "TNewCheckListBox1","left",1,11,31);---------------;点击列表控件相对位置
Sleep(200)
ControlClick($Wintitle_1, $Wintxt_5, "TNewCheckListBox1","left",1,7,52);---------------;点击列表控件相对位置
ControlClick($Wintitle_1, $Wintxt_5, "TNewButton3");---------------;点击按钮控件: 完成(&F)