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

    Function WinGetTitleByHandleSync

    • Retrieves the title of a window.

      Parameters

      • windowHandle: bigint

        The handle of the window to search for.

      • characterCount: number = 1024

        The number of characters to read from the window title buffer (default is 1024).

      Returns string

      The title of the window if found, or an empty string if not found.

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

      const handle = WinGetHandleSync('Untitled - Notepad');
      const title = WinGetTitleByHandleSync(handle);

      console.log(title); // Output: "Untitled - Notepad"