@PIDHWND — Searches for a window created by the specified process, and returns its handle.

Syntax:
%@PIDHWND[program,flags]

programprogram name or process ID; wildcards are supported
flagsbitmapped:
    1: return handle in hexadecimal

You can specify the program as:


@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.