IsHWnd

From AutoIt Wiki

Jump to: navigation, search

Checks if a variable's base type is a pointer and window handle. Adapted from AutoIt docs.

Contents

Syntax

$chk = IsHWnd(expr)

Parameters

exprThe expression to check.

Return Value

Success: Returns 1 if the expression is a pointer AND a valid window handle.
Failure: Returns 0 if expression is not a pointer OR not a valid window handle.

Example

Run("notepad.exe")
Local $hWnd = WinGetHandle("[CLASS:Notepad]")
If IsHWnd($hWnd) Then
    MsgBox(4096, "", "It's a valid HWND")
Else
    MsgBox(4096, "", "It's not an HWND")
EndIf

Related Functions

IsArray IsFloat IsInt IsPtr IsString IsNumber IsBool

Personal tools