酷狗音乐2010自动安装脚本
新手学习AU3,HOHOif判断写得不怎么好,希望大家给点建议!
#cs ____________________________________
Au3 版本: v3.3.6.1
脚本作者: ChaseDream
Email: 76993559@qq.com
QQ/TM: 76993559
脚本版本: 6.1.28.472
脚本功能: 酷狗音乐2010
#ce _______________脚本开始_________________
#region ---Au3Recorder generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Dim $AppName = ""
Dim $App = @ScriptDir&"\KuGou2010.exe"
Dim $installpath = "D:\Program Files\KuGou\KuGou2010"
Run($App)
_WinWaitActivate($AppName,"欢迎使用 酷狗音乐 安装向导")
ControlClick($AppName,"","")
_WinWaitActivate($AppName,"我已阅读并接受用户许可协议")
ControlClick($AppName,"","")
_WinWaitActivate($AppName,"安装程序将把 酷狗音乐 安装到以下文件夹。")
ControlSetText($AppName,"","",$installpath)
ControlClick($AppName,"","")
While 1
If WinExists($AppName," 酷狗音乐推荐安装以下绿色软件") Then
ControlCommand($AppName,"","","Check")
ControlClick($AppName,"","")
_WinWaitActivate($AppName,"酷狗音乐 安装完毕")
Send("{SPACE},{TAB},{SPACE},{TAB},{SPACE},{TAB},{SPACE}")
ControlClick($AppName,"","")
ExitLoop
ElseIf WinExists($AppName,"酷狗音乐 安装完毕") Then
Send("{SPACE},{TAB},{SPACE},{TAB},{SPACE},{TAB},{SPACE}")
ControlClick($AppName,"","")
ExitLoop
EndIf
WEnd
;清除多余文件
FileDelete(@AppDataDir&"\Microsoft\Internet Explorer\Quick Launch\酷狗音乐2010.lnk")
FileDelete(@ProgramsCommonDir&"\酷狗音乐\酷狗音乐2010\最新网页游戏.lnk")
FileDelete(@StartMenuCommonDir&"\酷狗音乐2010.lnk")
FileDelete(@ProgramsCommonDir&"\酷狗音乐2010.lnk")
#region --- Internal functions Au3Recorder Start ---
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
#endregion --- Internal functions Au3Recorder End ---
#endregion --- Au3Recorder generated code End ---
你这个好像不能成功安装你 判断那里有问题 呵呵,好像可以吧。我测试成功了!
我也觉得if判断那里写得不好 {:face (356):}路过支持下 好像都用不了啊。郁闷哦
页:
[1]