xiaolt2008 发表于 2008-11-29 19:57:33

加入判断语句,运行不下去了。ACD10

加入IF判断语句,运行不下去了,不加入还可以
Run("acdsee10.exe")
if  WinWaitActive("ACDSee 10 ","向导将允许您修改") = 1 Then
MsgBox(0, "阿迪王", "退出,因你已安装!")
ControlClick("ACDSee 10 ","向导将允许您修改", "")
ControlClick("ACDSee 10 ","是否确定要取消", "")

WinWaitActive("ACDSee 10 ","您的系统尚未修改")
ControlClick("ACDSee 10 ","您的系统尚未修改", "")
endif
WinWaitActive("ACDSee 10 ", "此程序受版权法与国际条约的保护")
ControlClick("ACDSee 10 ", "此程序受版权法与国际条约的保护", "")
WinWaitActive("ACDSee 10 ", "请仔细阅读")
ControlClick("ACDSee 10 ", "请仔细阅读", "")
WinWaitActive("ACDSee 10 ", "最终用户许可协议")
ControlClick("ACDSee 10 ", "最终用户许可协议", "")
WinWaitActive("ACDSee 10 ", "选择最适合")
ControlClick("ACDSee 10 ", "选择最适合", "")
WinWaitActive("ACDSee 10 ", "选择应该由")
ControlClick("ACDSee 10 ", "选择应该由", "")
WinWaitActive("ACDSee 10 ", "已准备好安装")
ControlClick("ACDSee 10 ", "已准备好安装", "")
WinWaitActive("ACDSee 10 ", "成功安装")
ControlClick("ACDSee 10 ", "成功安装", "")
ControlClick("ACDSee 10 ", "成功安装", "")
MsgBox(0, "阿迪王", "你好!安装成功!")

[ 本帖最后由 xiaolt2008 于 2008-11-29 20:55 编辑 ]

xiaolt2008 发表于 2008-11-29 20:54:44

找到原因了,语句加上等待时间,这里是20秒

if  WinWaitActive("ACDSee 10 ","向导将允许您修改",20) = 1 Then

tianyadeyouzi 发表于 2009-5-13 16:14:17

刚接触AUTOIT,学习了!

lynfr8 发表于 2009-5-16 12:14:35

呵呵,自己动手丰衣足食啊
同样学习了
细节的东西往往导致全盘皆败

lidenpan 发表于 2009-5-16 23:32:24

恩。。。学习学习。。

lzymbz 发表于 2009-11-9 16:20:15

关注中:face (13):
页: [1]
查看完整版本: 加入判断语句,运行不下去了。ACD10