Checks to see if a specified window exists.
WinExists ( "title" [, "text"] )
WinExists() will return 1 even if the window is hidden.
ProcessExists, WinActive, WinClose, WinTitleMatchMode (Option), WinWait, WinWaitActive, WinWaitClose, WinWaitNotActive
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Run Notepad
Run ("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
WinWait ("[CLASS:Notepad]","",10)
; Test if the window exists and display the results.
If WinExists ("[CLASS:Notepad]")Then
MsgBox ($MB_SYSTEMMODAL,"","Window exists")
Else
MsgBox ($MB_SYSTEMMODAL+ $MB_ICONERROR,"Error","Window does not exist")
EndIf
; Close the Notepad window.
WinClose ("[CLASS:Notepad]","")
EndFunc ;==>Example