找回密码
 加入
搜索
查看: 2482|回复: 6

QQ2009自动安装代码,请高手给看看有需要改进的地方吗?

[复制链接]
发表于 2009-7-3 15:29:15 | 显示全部楼层 |阅读模式
run("QQ2009_chs.exe")
WinWaitActive("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009")
ControlClick("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009","Button1")
ControlClick("腾讯QQ2009 安装向导","欢迎使用腾讯QQ2009","Button3")
WinWaitActive("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button9") ;去除一些不需要的选项
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button8")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button10")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button11")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button7")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button2")
WinWaitActive("腾讯QQ2009 安装向导","程序安装目录")
ControlSetText("腾讯QQ2009 安装向导","程序安装目录","Edit1","E:\QQ\qq2009")
ControlClick("腾讯QQ2009 安装向导","程序安装目录","Button2")
WinWaitActive("腾讯QQ2009 安装向导","安装完成")
ControlClick("腾讯QQ2009 安装向导","安装完成","Button6")
ControlClick("腾讯QQ2009 安装向导","安装完成","Button7")
ControlClick("腾讯QQ2009 安装向导","安装完成","Button8")
ControlClick("腾讯QQ2009 安装向导","安装完成","Button2")
发表于 2009-7-4 10:32:57 | 显示全部楼层
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button9") ;去除一些不需要的选项
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button8")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button10")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button11")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button7")
ControlClick("腾讯QQ2009 安装向导","请选择自定义安装选项与快捷方式选项","Button2")

ControlClick这个可以重复用的吗.?
 楼主| 发表于 2009-7-4 12:16:55 | 显示全部楼层
可以的,上面那些代码前5行是一些不需要的选项,最后一下是“下一步”按扭,只要控件ID写准了就行。
发表于 2009-8-14 22:46:40 | 显示全部楼层
这是我写的,大家看一下。
Run('QQ2009sp3.exe')
$hd="腾讯QQ2009 安装向导"
WinWait($hd,"我已阅读并同意")
WinWaitActive($hd,"我已阅读并同意")
controlcommand($hd,"欢迎使用腾讯QQ2009","Button1","check")
Send("!n")
WinWait($hd,"快捷方式选项")
WinWaitActive($hd,"快捷方式选项")
controlcommand($hd,"快捷方式选项","Button6","uncheck")
controlcommand($hd,"快捷方式选项","Button7","uncheck")
controlcommand($hd,"快捷方式选项","Button8","uncheck")
controlcommand($hd,"快捷方式选项","Button9","uncheck")
controlcommand($hd,"快捷方式选项","Button10","uncheck")
controlcommand($hd,"快捷方式选项","Button11","uncheck")
send("!n")
WinWait($hd,"请选择安装路径")
WinWaitActive($hd,"请选择安装路径")
send("!i")
WinWait($hd,"安装完成")
WinWaitActive($hd,"安装完成")
controlcommand($hd,"安装完成","Button6","uncheck")
controlcommand($hd,"安装完成","Button7","uncheck")
controlcommand($hd,"安装完成","Button8","uncheck")
controlcommand($hd,"安装完成","Button9","uncheck")
send("!f")
发表于 2009-8-15 10:43:17 | 显示全部楼层
那么也来看看我写的这个怎么样吧!
最后面两行删除的文件是QQ里我认为没有用的东西!反正删除了也不影响使用!
traytip("腾讯QQ2009自动安装","自动安装期间请勿做其它操作,否则有可能安装失败",15)
Run("QQ2009SP3.exe")
$bt="腾讯QQ2009 安装向导"
WinWait($bt,"欢迎使用腾讯QQ2009")
WinWaitActive($bt,"欢迎使用腾讯QQ2009")
ControlCommand($bt,"我已阅读并同意软件许可协议和青少年上网安全指导","Button1","check")
ControlClick($bt,"下一步(&N)","Button3")
WinWait($bt,"请选择自定义安装选项与快捷方式选项")
WinWaitActive($bt,"请选择自定义安装选项与快捷方式选项")
ControlCommand($bt,"安装QQ软件管理","Button8","uncheck")
ControlCommand($bt,"安装QQ工具栏及中文搜搜","Button9","uncheck")
ControlCommand($bt,"安装QQ拼音输入法","Button10","uncheck")
ControlCommand($bt,"安装QQ音乐播放器","Button11","uncheck")
ControlCommand($bt,"桌面","Button6","check")
ControlCommand($bt,"快速启动栏","Button7","uncheck")
ControlClick($bt,"下一步(&N)","Button2")
WinWait($bt,"请选择安装路径")
WinWaitActive($bt,"请选择安装路径")
ControlSetText($bt,"程序安装目录","Edit1","D:\Program Files\Tencent\QQ")
ControlClick($bt,"安装(&I)","Button2")
WinWaitActive($bt,"安装完成")
ControlCommand($bt,"立即运行腾讯QQ2009","Button6","uncheck")
ControlCommand($bt,"显示新特性","Button7","uncheck")
ControlCommand($bt,"开机时自动启动腾讯QQ2009","Button8","uncheck")
ControlCommand($bt,"设置腾讯网为主页","Button9","uncheck")
controlclick($bt,"完成(&F)","Button2")
FileDelete ("D:\Program Files\Tencent\QQ2009\Bin\TXPFProxy.dll")
FileDelete ("D:\Program Files\Tencent\QQ2009\Bin\TXPlatform.exe")
发表于 2009-8-18 15:03:21 | 显示全部楼层
很强大,不错
发表于 2009-8-18 23:33:45 | 显示全部楼层
不错,虽然现在还看不懂
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-26 00:29 , Processed in 0.078970 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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