IsPtr

From AutoIt Wiki

Jump to: navigation, search

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

Contents

Syntax

$chk = IsPtr(var)

Parameters

varThe variable to check.

Return Value

Success: Returns 1 if the expression is a pointer type.
Failure: Returns 0 if the expression is not a pointer type.

Example

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

Related Functions

IsArray IsFloat IsHWnd IsInt IsString IsNumber IsBool Ptr

Personal tools