找回密码
 加入
搜索
楼主: 星雨朝霞

[原创] 迅雷7自动安装源码

 火... [复制链接]
发表于 2011-3-4 17:14:05 | 显示全部楼层
谢谢了嗯。尤其是最后那个判断,我说我做的怎么也到不了最后。


这里的winwaitclose  是什么??错了。。
我怎么也获取不了窗口的文本。只好用  WinWait($title,"")  ,你那个 winwait($title,"thunder") 能获取到??

附上我做的:

#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=Thunder.exe|-1
#AutoIt3Wrapper_outfile=thundersetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****

$title="迅雷7安装程序"

Run("thunder.exe")
;安装协议
WinWait($title,"软件许可协议")
ControlClick($title,"软件许可协议","Button1","left",1)
;安装目录
Sleep(3000)
WinWait($title,"")
ControlSetText($title,"","Edit1","C:\Program Files\Thunder Network\Thunder")
ControlClick($title,"","Button7","left",1)

   WinWait("迅雷7","")
   ControlClick("迅雷7","","Button2","left",1)
WinWait($title,"")
ControlClick($title,"","Button1","left",1)
   WinWait("迅雷7","")
   ControlClick("迅雷7","","Button2","left",1)

;完成
WinWait($title,"")
While  1
        If ControlGetHandle($title,"","Button4") Then exitloop
        Sleep(1000)
WEnd

ControlClick($title,"","Button4","left",1)
ControlClick($title,"","Button5","left",1)
ControlClick($title,"","Button1","left",1)

Exit

本帖子中包含更多资源

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

×
发表于 2011-3-17 07:06:56 | 显示全部楼层
  能不能写个5.9的?
发表于 2011-4-22 22:26:58 | 显示全部楼层
看起来很不错,我也来学习学习。。。
发表于 2011-5-4 11:24:15 | 显示全部楼层
感谢高手分享,AU3学习中!
发表于 2011-5-6 14:29:13 | 显示全部楼层
楼主辛苦了!我来学习下!
发表于 2011-10-21 15:17:05 | 显示全部楼层
你好,怎么用最新版的迅雷Thunder7.2.3.3254.exe  最后一步还是不动的呢?
发表于 2011-11-2 09:31:13 | 显示全部楼层
敢问'  '和"  "是不是一个效果啊.....
183712314 发表于 2010-12-19 15:30



    同问
发表于 2011-11-2 13:59:29 | 显示全部楼层
不错不错,弄个自动安装
发表于 2011-11-11 09:13:13 | 显示全部楼层
发表于 2011-11-11 15:48:59 | 显示全部楼层
进来学习下,谢谢了
发表于 2011-11-11 20:50:39 | 显示全部楼层
条件
msgbox(0,"系统提示","脚本即将运行,在此期间键盘和鼠标将被禁用",2)
BlockInput (1)
DirCreate("d:\迅雷")
FileInstall("Thunder.exe","d:\迅雷\",1)
WinMinimizeAll()
Run("d:\迅雷\Thunder.exe")
WinWait("迅雷7安装程序", "软件许可协议")
WinActivate("迅雷7安装程序", "软件许可协议")
controlclick("迅雷7安装程序", "软件许可协议","Button1")
Sleep(1000)
ControlSetText("迅雷7安装程序","","Edit1","D:\Program Files\Thunder Network\Thunder")
ControlClick("迅雷7安装程序","","Button7")
ControlClick("迅雷7安装程序","","Button1")
sleep(1000)
if winactive("迅雷7")Then
        send("{enter}")
EndIf
sleep(2000)
if winactive("迅雷7")Then
        send("{enter}")
EndIf
sleep(75000)
ControlClick("迅雷7安装程序","","Button4")
ControlClick("迅雷7安装程序","","Button7")
ControlClick("迅雷7安装程序","","Button1")
FileDelete(@DesktopDir&"\迅雷看看-免费高清电影.LNK")
FileDelete(@DesktopCommonDir&"\迅雷看看-免费高清电影.LNK")
BlockInput (0)
循环

opt("TrayIconHide",1)
msgbox(0,"系统提示","脚本即将运行,在此期间键盘和鼠标将被禁用",2)
BlockInput (1)
DirCreate("d:\迅雷")
FileInstall("Thunder.exe","d:\迅雷\",1)
WinMinimizeAll()
Run("d:\迅雷\Thunder.exe")
WinWait("迅雷7安装程序", "软件许可协议")
WinActivate("迅雷7安装程序", "软件许可协议")
Send("{Enter}")
Sleep(1000)
ControlSetText("迅雷7安装程序","","Edit1","D:\Program Files\Thunder Network\Thunder")
ControlClick("迅雷7安装程序","","Button7")
send("{enter}{enter}")
sleep(1000)
while winactive("迅雷7")
        send("{enter}")
        WEnd
sleep(75000)
ControlClick("迅雷7安装程序","","Button4")
ControlClick("迅雷7安装程序","","Button7")
ControlClick("迅雷7安装程序","","Button1")
FileDelete(@DesktopDir&"\迅雷看看-免费高清电影.LNK")
FileDelete(@DesktopCommonDir&"\迅雷看看-免费高清电影.LNK")
BlockInput (0)
发表于 2012-3-28 21:38:38 | 显示全部楼层
收到了,测试后反馈给楼主,谢谢。
发表于 2012-4-4 14:11:48 | 显示全部楼层
学习了,看看收藏下
发表于 2012-4-6 19:16:33 | 显示全部楼层
感谢分享                     
发表于 2012-4-21 10:31:40 | 显示全部楼层
谢谢楼主分享
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-4 01:32 , Processed in 0.075560 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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