Function WinGetTitleByHandle

  • Retrieves the title of a window.

    Parameters

    • windowHandle: bigint

      The handle of the window to search for.

    • characterCount: number = 1024

    Returns string

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

    import { WinGetTitleByHandle, WinGetHandle } from '@ahmic/autoit-js';

    const handle = WinGetHandle('Untitled - Notepad');
    const title = WinGetTitleByHandle(handle);

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