以下是用那模板套的!虚拟机测试!如有漏掉或某步过不了,看看帮助文档!
For $i = 0 to 1
Global $var0
Assign("var0", "C")
$var1 = InputBox("路径选择", "开始 XX 的自动安装,请输入安装路径盘:","C", " M1")
If @error=1 Then
MsgBox(4096,"错误", "你点错按钮啦!")
Else
If $var1 = $var0 Then
$var2 = $var0
ElseIf $var1 <> $var0 Then
$var2 = $var1
EndIf
$i = FileExists($var2 & ":")
If $i = 0 Then
MsgBox(16, "警告!", "所选驱动器不存在!重新操作!")
Else
EndIf
EndIf
Next
If FileExists($var2 & ":\Program Files") Then
Else
DirCreate($var2 & ":\Program Files")
EndIf
$title="快车(FlashGet)2.3版 安装"
Run("flashget23cn.exe")
WinWaitActive($title, "欢迎使用 快车")
ControlClick($title, "", "Button2")
WinWaitActive($title, "许可证协议")
ControlClick($title, "", "Button2")
WinWaitActive($title, "选择安装位置")
If $var2 = $var0 Then
Else
$var3 = ControlGetText($title, "选择安装位置", "Edit1")
$var4 = StringReplace ( $var3, 1, $var2 )
ControlSetText($title, "选择安装位置", "Edit1", $var4 )
EndIf
ControlClick($title, "选择安装位置", "Button2")
WinWaitActive($title, "基本设置")
ControlClick($title, "", "Button8")
ControlClick($title, "", "Button6")
ControlClick($title, "", "Button4")
ControlClick($title, "", "Button2")
WinWaitActive($title, "Google工具栏")
ControlClick($title, "", "Button4")
ControlClick($title, "", "Button2")
WinWait("精品软件推荐","精品软件推荐")
If Not WinActivate("精品软件推荐","精品软件推荐") Then WinActivate("精品软件推荐","精品软件推荐")
WinWaitActive("精品软件推荐", "精品软件推荐")
ControlClick("精品软件推荐", "", "Button4")
ControlClick("精品软件推荐", "", "Button5")
ControlClick("精品软件推荐", "", "Button6")
ControlClick("精品软件推荐", "", "Button7")
ControlClick("精品软件推荐", "", "Button2")
WinWaitActive($title,"安装完成")
ControlClick($title, "", "Button2")
WinWait("快车欢迎你")
WinKill("快车欢迎你")
WinWaitActive("FlashGet","快车不是当前浏览器")
ControlClick("FlashGet", "", "Button1")
WinWaitActive("Default Downloads Path Setting","欢迎您使用快车!")
ControlClick("Default Downloads Path Setting", "", "Button1")
If Not WinActivate("快车(FlashGet) 2.3","热门电影资源下载") Then WinActivate("快车(FlashGet) 2.3","热门电影资源下载")
WinWaitActive("快车(FlashGet) 2.3", "热门电影资源下载")
WinWait("快车(FlashGet) 2.3")
WinKill("快车(FlashGet) 2.3")
ProcessWait("FlashGet.exe")
ProcessClose("FlashGet.exe")
$PID = ProcessExists("FlashGet.exe")
If $PID Then ProcessClose($PID)
ProcessClose ( "FlashGet.exe")
ProcessWait("iexplore.exe")
ProcessClose("iexplore.exe")
$PID = ProcessExists("iexplore.exe")
If $PID Then ProcessClose($PID)
ProcessClose ( "FlashGet.exe")
|