AutoIt online help

 
Function WinActive

Function 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 check. See Title special definition.
text [optional] The text of the window to check.

Return Value

Success: Returns the handle to the window if it is active.
Failure: Returns 0 otherwise.

Remarks

None.

Related

WinExists, WinWait, WinWaitActive, WinWaitClose, WinWaitNotActive, WinTitleMatchMode (Option)

Example


If WinActive("[CLASS:Notepad]") Then
    MsgBox(0, "", "Window was active")
EndIf

AUTOIT http://autoitscript.com
Online Service http://lampiweb.com