Method Reference
WinActive
Checks to see if a specified window exists and is currently active
WinActive "title" [, "text"]
Parameters
title | The title of the window to activate. |
text | Optional: The text of the window to activate. |
Return Value
Success: | Returns 1. |
Failure: | Returns 0 if window is not active. |
Related
WinExists, WinTitleMatchMode (Option), WinWait, WinWaitActive, WinWaitClose, WinWaitNotActive
Example
Set oAutoIt = WScript.CreateObject("AutoItX3.Control") If oAutoIt.WinActive("Untitled -") Then WScript.Echo "Window was active" End If