找回密码
 加入
搜索
查看: 2417|回复: 4

[AU3基础] QQ2012beta2.exe安装脚本执行到最后不动了?

[复制链接]
发表于 2012-7-1 01:44:52 | 显示全部楼层 |阅读模式
本帖最后由 yangge0528 于 2012-7-1 01:48 编辑

Run ("QQ2012beta2.exe")
WinWaitActive ("腾讯QQ2012 安装向导","欢迎")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","欢迎","Button1","Check","")
;选中
Send ("!n")
WinWaitActive ("腾讯QQ2012 安装向导","选项")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","选项","Button9","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button12","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button18","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button7","UnCheck","")
;选空
Send ("!n")
WinWaitActive ("腾讯QQ2012 安装向导","选择")
;等待指定窗口被激活后再执行下面的命令
ControlSetText  ("腾讯QQ2012 安装向导","选择","Edit1","d:\Program Files\Tencent\QQ")
;修改指定控件的文本
Send ("!i")
WinWaitActive ("腾讯QQ2012 安装向导","完成")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","完成","Button8","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button6","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button9","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button7","UnCheck","")
;选空
Send ("!f")





Run ("QQ2012beta2.exe")
WinWaitActive ("腾讯QQ2012 安装向导","欢迎")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","欢迎","Button1","Check","")
;选中
Send ("!n")
WinWaitActive ("腾讯QQ2012 安装向导","选项")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","选项","Button9","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button12","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button18","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","选项","Button7","UnCheck","")
;选空
Send ("!n")
WinWaitActive ("腾讯QQ2012 安装向导","选择")
;等待指定窗口被激活后再执行下面的命令
ControlSetText  ("腾讯QQ2012 安装向导","选择","Edit1","d:\Program Files\Tencent\QQ")
;修改指定控件的文本
Send ("!i")
WinWaitActive ("腾讯QQ2012 安装向导","完成")
;等待指定窗口被激活后再执行下面的命令
ControlCommand ("腾讯QQ2012 安装向导","完成","Button8","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button6","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button9","UnCheck","")
;选空
ControlCommand ("腾讯QQ2012 安装向导","完成","Button7","UnCheck","")
;选空
ControlClick ("腾讯QQ2012 安装向导","完成","Button2","left","1")
;向指定控件发送鼠标点击命令







两种都不动!!!为什么啊?帅哥、美女些指点一下!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2012-7-1 02:38:42 | 显示全部楼层
本帖最后由 user3000 于 2012-7-1 08:40 编辑

楼主, 你这问题怎么说, 很简单, 但测试起来却相对麻烦, 不是每个人都有时间或者在自己的机器上再装这个QQ不是?
你应该自己调试看看, 代码能完成运行吗? 从哪行代码起, 它应有的工作没有完成? 如果还没有调试脚本经验,可以加入新代码行:
ConsoleWrite('第 ' & @ScriptLineNumber & ' 行代码工作了!' & @CR)
似乎说多了, 但如果你能进一步确定你的的问题,  这样针对性很强, 相信有很多人愿意帮你, 也会帮到你!

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2012-7-1 10:43:49 | 显示全部楼层
可以试下吧WinWaitActive ("腾讯QQ2012 安装向导","完成")删除,改成sleep(5000)
发表于 2012-7-1 11:00:39 | 显示全部楼层
之前已经说咯
发表于 2012-7-1 11:18:21 | 显示全部楼层
Run(".\QQ2012Beta2.exe")

Local $a="腾讯QQ2012 安装向导"
WinWait($a)
WinWaitActive($a)

Sleep(500)

$a1="欢迎"
WinActivate($a,$a1)
WinWait($a,$a1)
WinWaitActive($a,$a1)
ControlClick($a,$a1,"Button1")
Send("!N")

$a2="选项"
WinWait($a,$a2)
WinWaitActive($a,$a2)
ControlClick($a,$a2,"Button9")
ControlClick($a,$a2,"Button12")
ControlClick($a,$a2,"Button17")
ControlClick($a,$a2,"Button18")
ControlClick($a,$a2,"Button7")
Send("!N")

$a3="选择"
;$a4="程序安装目录"
WinWait($a,$a3)
WinWaitActive($a,$a3)
ControlSetText($a,$a3,"Edit1", "d:\Program Files\Tencent\QQ")
ControlClick($a,$a3,"Button8")
Send("!I")

$a4="软件更新方式"
WinWait($a,$a4)
WinWaitActive($a,$a4)
ControlClick($a,$a4,"Button2")
Send("!N")

$a5="安装完成"
WinWait($a,$a5)
WinWaitActive($a,$a5)
ControlClick($a,$a5,"Button8")
ControlClick($a,$a5,"Button6")
ControlClick($a,$a5,"Button9")
ControlClick($a,$a5,"Button7")
Send("!F")
这是我以前的代码,是乎能解决问题吧!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-22 21:55 , Processed in 0.082553 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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