@ahmic/autoit-js
    Preparing search index...

    Function WinGetProcessByHandleSync

    • Retrieves the process ID associated with a window handle.

      Parameters

      • windowHandle: bigint

        The handle of the window to access.

      Returns number

      The process ID as a number.

      import { WinGetProcessByHandleSync, WinGetHandleSync } from '@ahmic/autoit-js';

      const windowHandle = WinGetHandleSync('Untitled - Notepad');
      const processId = WinGetProcessByHandleSync(windowHandle);

      console.log(processId); // Output: 1234