http://www.skycn.com/soft/2988.html 不好意思,刚刚设了断点发现是在前面出错,所以没执行成功。
另,在附加任务那,如何把创建桌面那几个勾去掉?是否是用ControlListView,SelectClear? 用ControlClick就行,自己研究吧,靠别人你永远长不大!而且这很简单 用ControlClick就行,自己研究吧,靠别人你永远长不大!而且这很简单
kn007 发表于 2009-6-12 20:50 http://www.autoitx.com/images/common/back.gif
ok,3q~ 本帖最后由 liangxm 于 2009-6-15 09:48 编辑
Opt("WinTitleMatchMode", 1)
; 处理输入命令
AdlibEnable("user")
Func user()
If WinExists("文件夹已存在","已存在") Then
ControlClick("文件夹已存在","已存在","Button1")
EndIf
EndFunc
Local $sUserName = "administrator"
Local $sPassword = "123456"
$file = "\auto_install\WoptiFree-V7.93Build9.305\WoptiFree.exe"
$dir = "D:\Program Files\Wopti\"
$title1 = "安装 - Windows优化大师"
RunAs($sUserName, @ComputerName, $sPassword, 0, $file)
WinWait($title1,"欢迎使用 Windows优化大师 安装向导")
If Not WinActivate($title1,"欢迎使用 Windows优化大师 安装向导") Then
WinActivate($title1,"欢迎使用 Windows优化大师 安装向导")
WinWaitActive($title1,"欢迎使用 Windows优化大师 安装向导")
EndIf
ControlClick($title1,"欢迎使用 Windows优化大师 安装向导","TNewButton1")
WinWait($title1,"许可协议")
If Not WinActivate($title1,"许可协议") Then
WinActivate($title1,"许可协议")
WinWaitActive($title1,"许可协议")
EndIf
Send("!a")
ControlClick($title1,"许可协议","TNewButton2")
WinWait($title1,"选择目标位置")
If Not WinActivate($title1,"选择目标位置") Then
WinActivate($title1,"选择目标位置")
WinWaitActive($title1,"选择目标位置")
EndIf
Send($dir )
Sleep(1000)
ControlClick($title1,"选择目标位置","TNewButton3")
WinWait($title1,"选择开始菜单文件夹")
If Not WinActivate($title1,"选择开始菜单文件夹") Then
WinActivate($title1,"选择开始菜单文件夹")
WinWaitActive($title1,"选择开始菜单文件夹")
EndIf
ControlClick($title1,"选择开始菜单文件夹","TNewButton4")
WinWait($title1,"要执行哪些附加任务")
If Not WinActivate($title1,"要执行哪些附加任务") Then
WinActivate($title1,"要执行哪些附加任务")
WinWaitActive($title1,"要执行哪些附加任务")
EndIf
;;;这个地方不知道怎么取消,只好用这种土办法了;;;
Send("!d")
Send("{down}")
Send("{space}")
;;;这个地方不知道怎么取消,只好用这种土办法了;;;
ControlClick($title1,"要执行哪些附加任务","TNewButton4")
AdlibDisable()
页:
1
[2]