@PIDHWND — Searches for
a window created by the specified process, and returns its handle.
Syntax:
%@PIDHWND[program,flags]
| program | program name or process ID; wildcards are supported |
| flags | bitmapped: |
| 1: return handle in hexadecimal |
You can specify the program as:
NOTEPAD.EXENOTEPAD; .* is assumedC:\WINDOWS\SYSTEM32\NOTEPAD.EXE=5892=0x1704@PIDHWND returns the window handle (HWND) of a matching window.
If no matching window is found, @PIDHWND returns 0.
Note that a process may have no windows, one window, or many windows. The
window that @PIDHWND chooses may not necessarily be the same one
that you would pick. To get a list of all top-level windows created by a
process, use @PIDHWNDS.