|
MsgPlus::DisplayToast
The MsgPlus::DisplayToast function displays a toast
(popup window in the corner of the screen) with the specified
message.
Syntax
[boolean] DisplayToast(
[string] Title,
[string] Message,
[string,optional] SoundFile,
[string,optional] Callback,
[var,optional] CallbackParam
);
Parameters
- Title
- [string] Title displayed on top of the toast. If an empty
string is sent in this parameter, "Messenger Plus! Live" is
used.
- Message
- [string] Message displayed in the toast. Carriage returns can
be used to force line breaks. A maximum of 4 lines can be displayed
in the toast created by this function. Format codes are not parsed
in this parameter and must be filtered out with RemoveFormatCodes.
- SoundFile
- [string,optional] Path to the sound file that will be played
when the toast is shown on screen. The path is relative to the
script's directory by default, to override this behavior, prefix
the path with "\". Example: "\C:\directory\sound.mp3". If the
parameter is missing or the string is empty, no sound is
played.
- Callback
- [string,optional] Name of the function in your script that will
be called if the toast is clicked by the user. If the parameter is
missing or the string is empty, the toast won't be clickable. For
more information, see ToastCallbackTemplate.
- CallbackParam
- [var,optional] Parameter of variable type (can be a number, a
string, an object, ...). This value will be sent as parameter of
the function specified in Callback
when the toast is clicked. It can be omitted if not needed.
Return Value
A boolean value specifying if the toast is going to be
displayed. The toast is not guaranteed to be displayed
immediately when the function returns, if Windows Live Messenger is
already displaying a toast, Messenger Plus! wait for its turn. Here
is a list (not exhaustive) of possible reasons why this function
may return false:
- The user's status is Busy and "Show Messenger Plus! popup
notifications when Busy" is unchecked in the user's
preferences.
- The user has locked out his Windows session.
- A screensaver is currently running.
- The user is playing to a full screen DirectX game.
Remarks
A variety of sound file types is supported by Messenger Plus!,
for a complete list, see PlaySound. To display toasts
supporting format codes, use DisplayToastContact.
Function Information
| Object |
MsgPlus |
| Availability |
Messenger Plus! Live 4.00 |
See Also
MsgPlus Object, DisplayToastContact,
PlaySound, ToastCallbackTemplate.
|