|
reply
用WindowVP()来比较
StartApplication NPAD_PATH
Window SetContext, "Caption=未定标题 - 记事本", ""
InputKeys "^a^v{UP 100}{LEFT 100}"
DelayFor 1000
InputKeys "^f"
DelayFor 1000
'输入“access-list 100 0 permit ip any any”并查找,查找窗口未出现为通过
'验证,返回值为1,说明找到查找值
Window SetContext, "Caption=查找", ""
InputKeys "access-list 100 0 permit ip any any{ENTER}"
DelayFor 1000
liv_result = WindowVP (Exists, "Caption=记事本", _
"VP=Window Existence;Wait=1,1;ExpectedResult=FAIL")
'没有“access-list 100 0 permit ip any any”输出,则将多一次关闭因
'找不到该字符串而产生的“记事本”窗口操作
If liv_result = 0 Then
Window CloseWin, "Caption=记事本", ""
Window CloseWin, "Caption=查找", ""
Else
Window SetContext, "Caption=查找", ""
Window CloseWin, "", ""
End If |
|