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

    Function Tooltip

    • Display a tooltip with the specified value at the specified position.

      The actual AU3_Tooltip function from AutoIt appears to be broken so it has been reimplemented here using the Windows User32 library.

      NOTE: While this function is primarily asynchronous, it uses the synchronous variants of some of the Win32 functions as the async variants cause undefined behaviour where the promises never resolve. These functions are quite fast and tooltips are unlikely to be used extensively so this should not cause any issues (famous last words...). The Sleep call is still asynchronous, so the tooltip will not block the event loop while it is displayed, only during creation and destruction of the tooltip window. If you run into any issues with this, please open an issue!

      Parameters

      • value: string

        The text to display in the tooltip.

      • x: number = 0

        The x-coordinate of the tooltip position. Default is 0.

      • y: number = 0

        The y-coordinate of the tooltip position. Default is 0.

      • width: number = 400

        The maximum width of the tooltip in pixels. Default is 400.

      • timeout: number = 2000

        The duration in milliseconds to display the tooltip. Default is 2000.

      Returns Promise<boolean>

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

      await Tooltip('Hello, World!', 100, 200, 20, 3000);