Function WinGetTitle

  • Retrieves the title of a window.

    Parameters

    • windowTitle: string

      The title of the window to search for.

    • windowText: string = ''

      Optional text found in the window.

    • characterCount: number = 1024

    Returns string

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

    import { WinGetTitle } from '@ahmic/autoit-js';

    const title = WinGetTitle('Untitled - Notepad');

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