#requireadmin
#Region AutoIt3Wrapper 预编译参数(常用参数)
#AutoIt3Wrapper_icon=Thunder_5.9.5.990.exe
#AutoIt3Wrapper_outfile=Thunder_5.9.5.990_zd.exe
#AutoIt3Wrapper_Res_Description=迅雷下载 AU3自动安装
#AutoIt3Wrapper_Res_Description=迅雷下载 版本:5.9.5.990
#AutoIt3Wrapper_Res_LegalCopyright = 版权所有 (C) 2009_131738
#AutoIt3Wrapper_Res_Comment=脚本生成于:2009年 08月 21日
#EndRegion AutoIt3Wrapper 预编译参数设置完成
#comments-start __________________
Au3 版本: 3.3.1.0
脚本作者: 131738
Email:
QQ/TM:
脚本版本: 迅雷安装1.0
脚本功能: 自动安装: 迅雷下载
#comments-end 脚本开始____
For $i = 0 to 1
$ChoiceInstallPath = InputBox ( "路径选择", "开始 xx 自动安装" & _
@CR & @CR & " 请输入安装路径盘:","C", " M1" )
If @error = 1 And $i = 0 Then
MsgBox ( 64, "错误", "点错按钮啦!" & _
@CR & @CR & "还有 1 次机会, 小心操作哦!" )
ContinueLoop
ElseIf @error = 1 And $i = 1 Then
MsgBox ( 64,"警告", "操作失误! 3秒后脚本结束!",3 )
Exit
EndIf
$A = FileExists($ChoiceInstallPath & ":")
If $A = 0 And $i = 0 Then
MsgBox( 64, "警告!", "所选驱动器不存在! 重新操作!" & _
@CR & @CR & "还有 1 次机会, 小心操作哦!")
ContinueLoop
ElseIf $A = 0 And $i = 1 Then
MsgBox ( 64,"警告","操作失误! 3秒后脚本结束!",3 )
Exit
EndIf
If @error = 0 And $A = 1 Then ExitLoop
Next
If Not FileExists ( $ChoiceInstallPath & ":\Program Files" ) _
Then DirCreate ( $ChoiceInstallPath & ":\Program Files" )
Run ( @ScriptDir & "\Thunder_5.9.5.990.exe" )
; 以上为"目标文件"按钮生成的语句, 同时启动迅雷安装, AutoIt 窗口信息工具
;==============================================================
WinWaitActive( "迅雷5: 用户使用协议", "欢迎使用 迅雷5 安装向导" ) ;"标题与文本"按钮
ControlClick( "迅雷5: 用户使用协议", "","Button2" ) ;"控件点击"按钮
WinWaitActive( "迅雷5: 安装选项", "选择附加任务" ) ;"标题与文本"按钮
; 以下为点击“一控多”按钮,填写所需多选项数后,鼠标移到大包围控件,单击鼠标中键
$WinPosArray = WinGetPos ( "迅雷5: 安装选项" )
$TNewCheckListBoxArray = ControlGetPos ( "迅雷5: 安装选项", "", "SysTreeView321" )
$Width = $WinPosArray[0] + $TNewCheckListBoxArray[0]
$Height = $WinPosArray[1] + $TNewCheckListBoxArray[1]
MouseClick ( "left", $Width + 15 , $Height + 55 ) ;所有数字在弹出的调试脚本中手动调试
MouseClick ( "left", $Width + 15 , $Height + 71 ) ; 然后将数字结果写入本工具编辑框 + 号后面!
MouseClick ( "left", $Width + 15 , $Height + 86 )
MouseClick ( "left", $Width + 15 , $Height + 100 )
MouseClick ( "left", $Width + 15 , $Height + 117 )
;================================================================================================
; 以下为点击“路径修改”按钮
WinWaitActive ( "迅雷5: 安装选项", "< 上一步(&P)" ) ;这一句是“路径修改”按钮自带的,不需要另外选择按钮!
$DefaultInstallPath = ControlGetText ( "迅雷5: 安装选项", "","Edit1" )
$DriveName = StringLeft ( $DefaultInstallPath, 1 )
If $DriveName = $ChoiceInstallPath Then
ControlClick ( "迅雷5: 安装选项", "", "Button2" )
ElseIf $DriveName <> $ChoiceInstallPath Then
$DriveReplace = StringReplace ( $DefaultInstallPath, 1, $ChoiceInstallPath )
ControlSetText ( "迅雷5: 安装选项", "", "Edit1", $DriveReplace )
$SoothInstallPath = ControlGetText ( "迅雷5: 安装选项", "", "Edit1" )
EndIf
ControlClick ( "迅雷5: 安装选项", "", "Button2" ) ;这一句是“路径修改”按钮自带的,不需要另外选择按钮!
;======================================================================================================
WinWaitActive( "安装:迅雷5", "百度工具栏 轻松搜索,拦截广告!" ) ;"标题与文本"按钮
ControlClick( "安装:迅雷5", "","Button4" ) ;"控件点击"按钮
ControlClick( "安装:迅雷5", "","Button2" ) ;"控件点击"按钮
;下两句为“等待窗口”按钮,点击该按钮后,鼠标移到窗口文本处,单击鼠标中键
WinWait ( "迅雷5: 安装完成","迅雷5安装程序已完成安装" )
If Not WinActivate ( "迅雷5: 安装完成","" ) Then WinActivate ( "迅雷5: 安装完成","" )
;======================================================================================
WinWaitActive( "迅雷5: 安装完成", "迅雷5安装程序已完成安装" ) ;"标题与文本"按钮
ControlClick( "迅雷5: 安装完成", "","Button5" ) ;"控件点击"按钮
ControlClick( "迅雷5: 安装完成", "","Button6" ) ;"控件点击"按钮
ControlClick( "迅雷5: 安装完成", "","Button2" ) ;"控件点击"按钮
;=================================================================================
;以下为点击“关闭进程”按钮,这个按钮只是点击一下就行了,没有任何其它操作!
ProcessWait ( "iexplore.exe" )
ProcessClose ( "iexplore.exe" )
$PID = ProcessExists ( "iexplore.exe" )
If $PID Then ProcessClose ( $PID )
;===========================================
; 复制去广告补丁
; 以下为点击“复制按钮,点击后会相继弹出文件选择、文件夹选择两个对话框,
; 分别选择要复制的文件、要复制到的文件夹。
FileCopy ( "ThunderUI.xml","E:\Program Files\Thunder Network\Thunder\Program",1 )
FileCopy ( "Streamer.xml","E:\Program Files\Thunder Network\Thunder\Components\Streamer",1 )
;===========================================================================================
; 以下点击“转换文件”按钮
SplashTextOn ( "自动安装", "已完成 1.0 的自动安装. ", 250, 70, -1, -1, 0, "", 14 )
Sleep ( 2000 )
看着有点乱!复制到你的脚本编辑器中好看些!