/** * SendMessageW return values for specific messages. * * | Message | Return Value | * |:---------------------|:-----------------------------| * | `TTM_ADDTOOLW` | 1 if successful, otherwise 0 | * | `TTM_SETMAXTIPWIDTH` | Previous width | * | `TTM_TRACKPOSITION` | Unused | * | `TTM_TRACKACTIVATE` | Unused | */ /** * 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. * * @param value The text to display in the tooltip. * @param x The x-coordinate of the tooltip position. Default is 0. * @param y The y-coordinate of the tooltip position. Default is 0. * @param width The maximum width of the tooltip in pixels. Default is 400. * @param timeout The duration in milliseconds to display the tooltip. Default is 2000. * * @returns True if the tooltip was displayed successfully, otherwise false. * * @example * ```typescript * import { TooltipSync } from '@ahmic/autoit-js'; * * TooltipSync('Hello, World!', 100, 200, 20, 3000); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ToolTip.htm */ export declare function TooltipSync(value: string, x?: number, y?: number, width?: number, timeout?: number): boolean; /** * 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! * * @param value The text to display in the tooltip. * @param x The x-coordinate of the tooltip position. Default is 0. * @param y The y-coordinate of the tooltip position. Default is 0. * @param width The maximum width of the tooltip in pixels. Default is 400. * @param timeout The duration in milliseconds to display the tooltip. Default is 2000. * * @example * ```typescript * import { Tooltip } from '@ahmic/autoit-js'; * * await Tooltip('Hello, World!', 100, 200, 20, 3000); * ``` * * @see https://www.autoitscript.com/autoit3/docs/functions/ToolTip.htm */ export declare function Tooltip(value: string, x?: number, y?: number, width?: number, timeout?: number): Promise;