今天上午研究了一下AU3,感觉很有意思,就按着帮助文档写了个小脚本,发上来给给位指点一下。
TrayTip("系统提醒您:请勿动键盘和鼠标!","正在安装QQ2009到你的D盘,请稍候...",10,1)
$var = DriveStatus( "D:" )
If $var ="Ready" Then
run("qq2009")
WinWaitActive("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009")
WinSetState("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009", @SW_HIDE)
ControlClick("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009","[ID:1020]")
ControlEnable ("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009","[ID:1015]")
ControlClick("腾讯QQ2009 安装向导","","[ID:1015]")
WinWaitActive("腾讯QQ2009 安装向导","请选择使用环境与查杀木马设置")
ControlClick("腾讯QQ2009 安装向导","请选择使用环境与查杀木马设置","[ID:1015]")
WinWaitActive("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","[ID:1038]")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","[ID:1015]")
WinWaitActive("腾讯QQ2009 安装向导","请选择安装路径")
ControlClick("腾讯QQ2009 安装向导","请选择安装路径","[ID:1040]")
ControlSetText("腾讯QQ2009 安装向导","请选择安装路径","[ID:1040]","D:Program FilesTencentQQ2009")
ControlClick("腾讯QQ2009 安装向导","请选择安装路径","[ID:1002]")
ControlClick("腾讯QQ2009 安装向导","请选择安装路径","[ID:1016]")
WinWaitActive("腾讯QQ2009 安装向导","安装完成")
ControlClick("腾讯QQ2009 安装向导","安装完成","[ID:1045]")
ControlClick("腾讯QQ2009 安装向导","安装完成","[ID:1046]")
ControlClick("腾讯QQ2009 安装向导","安装完成","[ID:1047]")
ControlClick("腾讯QQ2009 安装向导","安装完成","[ID:1017]")
Else
MsgBox(0,"错误提示:","在你的系统中没发现D:盘,软件无法自动安装!")
Exit
EndIf |