Checks if a variable's base type is a pointer and window handle.
IsHWnd ( variable )
| variable | The variable/expression to check. |
| Success: | Returns 1 if the expression is a pointer type AND a valid window handle. |
| Failure: | Returns 0 if expression is not a pointer OR not a valid window handle. |
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Test if the window was found and display the results.
If IsHWnd($hWnd) Then
MsgBox(4096, "", "It's a valid HWND")
Else
MsgBox(4096, "", "It's not a valid HWND")
EndIf
EndFunc ;==>Example