Run('program.exe')
WinWaitActive("Title window")
;Test how long is 3 seconds
Sleep(3000)
;Set key delay to one second
AutoItSetOption("SendKeyDelay", 1000)
Send("{ALT}{RIGHT}{DOWN}{ENTER}{SPACE}")
WinWaitActive("A message box came out")
Sleep(2000)
;close massage box (this is all point of this program)
Send("{SPACE}")
;start wait again for popup
WinWaitActive("Another massage box came out")
Sleep(2000)
Send("{SPACE}")
;and again
WinWaitActive("Another massage box came out")
Sleep(2000)
Send("{SPACE}")
Sleep(2000)
MsgBox(0,'Info','AutoIt program will exit now');
;no one will press again [ok] for pop up window
;how badResources:https://www.autoitscript.com/autoit3/docs/functions/Send.htm
No comments:
Post a Comment