找回密码
 加入
搜索
查看: 2619|回复: 10

新手刚做的,无法自动运行!请前辈指点错误!谢谢!

[复制链接]
发表于 2009-3-16 08:42:03 | 显示全部楼层 |阅读模式
新手刚做的,无法自动运行!请前辈指点错误!谢谢!


Run('flashget23cn.exe')
WinWaitActive("快车(FlashGet)2.3版  安装","欢迎使用 快车(FlashGet)2.3版 安装程序")
ControlClick("快车(FlashGet)2.3版  安装","下一步[&N]","Button2")
send("{enter}")
WinWaitActive("快车(FlashGet)2.3版  安装","许可证协议")
ControlClick("快车(FlashGet)2.3版  安装","许可证协议","Button2")
send("{enter}")
WinWaitActive("快车(FlashGet)2.3版  安装","选择安装位置")
ControlClick("快车(FlashGet)2.3版  安装","选择安装位置","Button2")
send("{enter}")
WinWaitActive("快车(FlashGet)2.3版  安装","附加任务")
WinWaitActive("快车(FlashGet)2.3版  安装","附加任务","基本设置")
ControlCommand ("快车(FlashGet)2.3版  安装","附加任务", "Button8", "UnCheck", "" )
ControlCommand ("快车(FlashGet)2.3版  安装","附加任务", "Button7", "Check", "" )
ControlCommand ("快车(FlashGet)2.3版  安装","附加任务", "Button6", "UnCheck", "" )
ControlCommand ("快车(FlashGet)2.3版  安装","附加任务","Button5", "UnCheck", "" )
ControlCommand ("快车(FlashGet)2.3版  安装","附加任务", "Button4", "UnCheck", "" )
WinWaitActive("快车(FlashGet)2.3版  安装","附加任务")
ControlClick("快车(FlashGet)2.3版  安装","附加任务","Button2")
send("{enter}")
WinWaitActive("快车(FlashGet)2.3版  安装","Google工具栏,免费并简单易用")
ControlClick("快车(FlashGet)2.3版  安装","Button4", "UnCheck")
ControlClick("快车(FlashGet)2.3版  安装","下一步[&N]","Button2")
send("{enter}")
WinWaitActive("精品软件推荐","精品软件推荐")
ControlCommand ("精品软件推荐","精品软件推荐", "Button4", "UnCheck", "" )
ControlCommand ("精品软件推荐","精品软件推荐", "Button5", "UnCheck", "" )
ControlCommand ("精品软件推荐","精品软件推荐", "Button6", "UnCheck", "" )
ControlCommand ("精品软件推荐","精品软件推荐", "Button7", "UnCheck", "" )
ControlClick("精品软件推荐","下一步[&N]","Button2" )
send("{enter}")
WinWaitActive("快车(FlashGet)2.3版  安装","完成","Button2")
send("{enter}")
发表于 2009-3-16 08:53:46 | 显示全部楼层
请问到哪一步停止了
 楼主| 发表于 2009-3-16 09:22:23 | 显示全部楼层
只运行了一步:
Run('flashget23cn.exe')
WinWaitActive("快车(FlashGet)2.3版  安装","欢迎使用 快车(FlashGet)2.3版 安装程序")
ControlClick("快车(FlashGet)2.3版  安装","下一步[&N]","Button2")

停止不动了!

[ 本帖最后由 enet98 于 2009-3-16 09:38 编辑 ]
发表于 2009-3-16 10:39:26 | 显示全部楼层
第3行改为:
ControlClick("快车(FlashGet)2.3版  安装","欢迎使用 快车(FlashGet)2.3版 安装程序","Button2")

第3行或改为:
ControlClick("快车(FlashGet)2.3版  安装","","Button2")

send("{enter}")  去掉所有回车行!

试试!!!
发表于 2009-3-16 10:41:16 | 显示全部楼层
手动安装也是鼠标点按纽后,不用再按键盘回车的吧!
 楼主| 发表于 2009-3-16 12:02:30 | 显示全部楼层
原帖由 131738 于 2009-3-16 10:39 发表
第3行改为:
ControlClick("快车(FlashGet)2.3版  安装","欢迎使用 快车(FlashGet)2.3版 安装程序","Button2")

第3行或改为:
ControlClick("快车(FlashGet)2.3版  安装","","Button2")

send("{enter} ...


还是不行!
 楼主| 发表于 2009-3-16 12:03:27 | 显示全部楼层
手动安装鼠标点按纽后,不用再按键盘回车!
 楼主| 发表于 2009-3-16 12:05:52 | 显示全部楼层
发表于 2009-3-16 14:46:15 | 显示全部楼层
以下是用那模板套的!虚拟机测试!如有漏掉或某步过不了,看看帮助文档!
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")
发表于 2009-3-16 14:58:21 | 显示全部楼层
houxiren =  enet98  !!!???
 楼主| 发表于 2009-3-16 15:06:12 | 显示全部楼层
原帖由 131738 于 2009-3-16 14:46 发表
以下是用那模板套的!虚拟机测试!如有漏掉或某步过不了,看看帮助文档!
[au3]For $i = 0 to 1
Global $var0
Assign("var0", "C")
$var1 = InputBox("路径选择", "开始 XX 的自动安装,请输入安装路径盘:","C", ...



第一步就出现问题?

本帖子中包含更多资源

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

×
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-12-24 02:00 , Processed in 0.083024 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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