Creates an always-on-top window anywhere on the screen.
ToolTip [, Text, X, Y, WhichToolTip] |
Parameters
Text | If blank or omitted, the tooltip will be hidden. Otherwise, this parameter is the text to display in the tooltip. To create a multi-line tooltip, use the linefeed character (`n) in between each line, e.g. Line1`nLine2. If Text is long, it can be broken up into several shorter lines by means of a continuation section, which might improve readability and maintainability. |
X, Y | The X and Y position of the tooltip relative to the active window (use "CoordMode, ToolTip" to change to screen coordinates). If the coordinates are omitted, the tooltip will be shown near the mouse cursor. These parameters can be expressions. |
WhichToolTip | Omit this parameter if you don't need multiple tooltips to appear simultaneously. Otherwise, this is a number between 1 and 20 to indicate which tooltip window to operate upon. If unspecified, that number is 1 (the first). This parameter can be an expression. |
Remarks
If the X & Y coordinates would cause the tooltip to run off screen, it is repositioned to be visible.
The tooltip appears until it is cleared by running the command with no parameters, until the script terminates, or sometimes until it is clicked upon.
A GUI window may be made the owner of a ToolTip by means of Gui +OwnDialogs. Such a ToolTip is automatically destroyed when its owner is destroyed.
Related
CoordMode, TrayTip, GUI, Progress, SplashTextOn, MsgBox, InputBox, FileSelectFile, FileSelectFolder
Example
ToolTip, Multiline`nTooltip, 100, 150 ; To have a ToolTip disappear after a certain amount of time ; without having to use Sleep (which stops the current thread): #Persistent ToolTip, Timed ToolTip`nThis will be displayed for 5 seconds. SetTimer, RemoveToolTip, 5000 return RemoveToolTip: SetTimer, RemoveToolTip, Off ToolTip return