@HWNDPID — Returns the process ID of the process which created a given window.

Syntax:
%@HWNDPID[hwnd,flags]

hwndthe window’s handle; decimal or hex with a leading 0x
flagsbitmapped:
    1: return process ID in hexadecimal

This function only takes a window handle, not a title. It’s basically a wrapper around the Windows GetWindowThreadProcessId() function.

If the specified window does not exist, or on any other error, this function returns 0.