Function Reference
ToolTip
Creates a tooltip anywhere on the screen.
ToolTip ( "text" [, x [, y [, "title" [, icon = 0 [, options]]]]] )
Parameters
text
The text of the tooltip. (An empty string clears a displaying tooltip)
x
[optional] The x position of the tooltip.
y
[optional] The y position of the tooltip.
title
[optional] The title for the tooltip.
icon
[optional] Pre-defined icon to show next to the title: Requires a title.
$TIP_NOICON (0) = No icon
$TIP_INFOICON (1) = Info icon
$TIP_WARNINGICON (2) = Warning icon
$TIP_ERRORICON (3) = Error Icon
Constants are defined in "AutoItConstants.au3".
options
[optional] Sets different options for how the tooltip will be displayed (Can be added together):
$TIP_BALLOON (1) = Display as Balloon Tip
$TIP_CENTER (2) = Center the tip at the x,y coordinates instead of using them for the upper left corner.
$TIP_FORCEVISIBLE (4) = Force the tooltip to always be visible confining it to monitor borders if necessary. If multiple monitors are used, then the tooltip will "snap-to" the nearest monitor.
Constants are defined in "AutoItConstants.au3".
Return Value
Success:
1.
Failure:
0 when title length is greater than 99.
Remarks
To skip an optional parameter, leaving its default value intact, use the Default keyword.
If the x and y coordinates are omitted, the tip is placed near the mouse cursor.
A Tooltip will appear until the script terminates or ToolTip("") is called.
You may use @CR or @LF to create multi-line tooltips.
To display an icon, you must specify a non-empty title. The icon appears on the same row as the title and thus requires a title to be present.
If using the center flag, the center of the tooltip will be at the coordinates specified.
If using the center flag with a Balloon Tip, the text will be centered on the balloon and will point to the coordinates specified.
Related
MsgBox, SplashTextOn, TrayTip
Example
; This will create a tooltip in the upper left of the screen
ToolTip ("This is a tooltip",0,0)
Sleep (2000); Sleep to give tooltip time to display