大家看看我的脚本错在哪儿了?
if WinWaitActive("指定盘符")=1 Then **如果条件符合这以下可以运行但不符合条件的else以后就运行不WinWait("指定盘符") 了,不知是什么原因,知道的朋友帮帮忙~感激
WinWaitActive("指定盘符")
send("{TAB 2}")
send("{DOWN 10}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","成功")
WinWaitActive("成功","成功")
send("{ENTER}")
else
winWait("警告")
WinWaitActive("警告")
Send("{ENTER}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","磁盘卸载成功")
WinWaitActive("成功","磁盘卸载成功")
send("{ENTER}")
send("{TAB 2}")
send("{SPACE}")
send("{TAB 4}")
send("{ENTER}")
send("{TAB 2}")
send("{DOWN 10}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","成功")
WinWaitActive("成功","成功")
send("{ENTER}")
EndIf
[ 本帖最后由 xpban2006 于 2008-10-1 23:40 编辑 ] 解决了!!
if WinExists("指定盘符")=1 Then
WinWait("指定盘符")
WinWaitActive("指定盘符")
send("{TAB 2}")
send("{DOWN 10}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","成功")
WinWaitActive("成功","成功")
send("{ENTER}")
endif
if WinExists("警告")=1 Then
winWait("警告")
WinWaitActive("警告")
Send("{ENTER}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","磁盘卸载成功")
WinWaitActive("成功","磁盘卸载成功")
send("{ENTER}")
send("{TAB 2}")
send("{SPACE}")
send("{TAB 4}")
send("{ENTER}")
send("{TAB 2}")
send("{DOWN 10}")
send("{TAB}")
send("{ENTER}")
WinWait("成功","成功")
WinWaitActive("成功","成功")
send("{ENTER}")
EndIf 你可以不用那么多个 Send() 的啊,把全部并且连续要 Send 的都放一个 Send() 里!
页:
[1]