Function Reference


TrayTip

Displays a balloon tip from the AutoIt Icon.

TrayTip ( "title", "text", timeout [, option = 0] )

Parameters

title Text appears in bold at the top of the balloon tip. (63 characters maximum)
text Message the balloon tip will display. (255 characters maximum)
timeout A rough estimate of the time (in seconds) the balloon tip should be displayed. (Windows has a min and max of about 10-30 seconds but does not always honor a time in that range.)
option [optional]
    $TIP_ICONNONE (0) = No icon (default)
    $TIP_ICONASTERISK (1) = Info icon
    $TIP_ICONEXCLAMATION (2) = Warning icon
    $TIP_ICONHAND (3) = Error icon
    $TIP_NOSOUND (16) = Disable sound

Constants are defined in TrayConstants.au3.

Return Value

None.

Remarks

A Tray tip will close if the AutoIt tray icon disappears. Consequently, the TrayTip() may not appear if Opt("TrayIconHide", 1) is set or if the user has disabled balloon tips via registry settings!

Windows XP usually plays a sound when displaying a balloon tip. This sound can be disabled by adding $TIP_NOSOUND to the option parameter or by setting an empty title.

To clear a balloon tip that is being displayed, call another tip with an empty text string (and any title).

Related

MsgBox, ToolTip, TrayIconHide (Option), TraySetToolTip

Example

#include <MsgBoxConstants.au3>
#include <TrayConstants.au3>

TrayTip("I'm a title", "I'm the message", 0, $TIP_ICONASTERISK)
MsgBox($MB_SYSTEMMODAL, "", "Press OK to reset the tip.")
TrayTip("clears any tray tip", "", 0)
MsgBox($MB_SYSTEMMODAL, "", "Press OK to see another tip.")
TrayTip("", "A different tray tip.", 5)
Sleep(5000)