记事本:
Run("cmd.exe")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Sleep(10000)
Send("d:\a.txt")
Send("{ENTER}")
WinWaitActive("a.txt - 记事本")
Send("aaaaaaaaaaaaabbbbbaaaaaaaa")
;Send("!f")
;Send("s")
WinClose("a.txt - 记事本")
WinWaitActive("记事本")
ControlClick("记事本","",2)
WinWaitActive("a.txt - 记事本")
WinClose("a.txt - 记事本")
WinWaitActive("记事本")
ControlClick("记事本","",6)
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Send("d:\a.txt")
Send("{ENTER}")
WinWaitActive("a.txt - 记事本")
WinClose("a.txt - 记事本")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Send("exit")
Send("{ENTER}")
;WinClose("a.txt - 记事本")
;WinWaitActive("记事本")
;Send("!n")
;WinWaitActive("C:\WINDOWS\system32\cmd.exe")
;Send("exit")
计算器:
Run("calc")
$flag=WinWaitActive("计算器","",5)
If d:\a.txt
MsgBox(0,"OO",$flag)
Send("1")
$text=ControlGetText("计算器","",403)
If $text == 1. then
MsgBox(0,"aaa",$text)
else
MsgBox(0,"bbb",$text)
EndIf
Send("{+}")
Send("1")
Send("{ENTER}")
WinWaitActive("计算器","2")