找回密码
 加入
搜索
查看: 3566|回复: 1

[原创] QQ2011官方BATA2自动安装~~小试牛刀

[复制链接]
发表于 2011-5-4 18:52:38 | 显示全部楼层 |阅读模式
$Teet="腾讯QQ2011 安装向导"
$Teet2="请选择安装路径"
$Teet3=""
$Teet4="欢迎使用腾讯QQ2011"
$Teet5="我已阅读并同意软件许可协议和青少年上网安全指引"
$Teet6="请选择自定义安装选项与快捷方式选项"
$Teet7="安装完成"
ShellExecute("QQ2011.exe","",@ScriptDir,"open")

TrayTip("正在安装程序","安装过程请勿安装其他软件",5,1)
WinWait($Teet,$Teet4)
WinActivate($Teet,$Teet4)
ControlClick($Teet,$Teet5,"Button1")
ControlClick($Teet,$Teet4,"[CLASS:Button; INSTANCE:3]")

WinWait($Teet,$Teet6)
WinActivate($Teet,$Teet6)
ControlClick($Teet,$Teet6,"[CLASS:Button; INSTANCE:9]")
ControlClick($Teet,$Teet6,"[CLASS:Button; INSTANCE:12]")
ControlClick($Teet,$Teet6,"[CLASS:Button; INSTANCE:17]")
ControlClick($Teet,$Teet6,"[CLASS:Button; INSTANCE:7]")
ControlClick($Teet,$Teet6,"[CLASS:Button; INSTANCE:2]")

WinWait($Teet,$Teet2)
WinActivate($Teet,$Teet2)
ControlSetText($Teet,$Teet3,"Edit1","d:\Program Files\Tencent\QQ")
ControlClick($Teet,$Teet2,"[CLASS:Button; INSTANCE:7]")
ControlClick($Teet,$Teet2,"[CLASS:Button; INSTANCE:2]")

WinWait($Teet,"正在提取安装文件")
WinWaitClose($Teet,"正在提取安装文件")
While 1
        If ControlGetHandle($Teet,$Teet7,"Button6") Then ExitLoop
WEnd
ControlClick($Teet,$Teet7,"Button6")
ControlClick($Teet,$Teet7,"Button8")
ControlClick($Teet,$Teet7,"Button9")
ControlClick($Teet,$Teet7,"Button7")
ControlClick($Teet,$Teet7,"Button2")

ProcessClose("QQ2011.exe")


不多说废话 由于前面那个要付费以致大家舍不得看介于大家的要求把代码发出
希望版主不要责怪发同样的帖子
发表于 2011-12-28 10:34:23 | 显示全部楼层
哈哈 不错的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-21 20:02 , Processed in 0.068216 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表