|
OnGetScriptCommands
The OnGetScriptCommands event is fired when Messenger
Plus! needs to display a list of commands supported by the script.
Each command is defined with a name, an optional description and an
optional set of parameters. This list is used for information only,
commands have to be manually parsed by the script in OnEvent_ChatWndSendMessage.
Syntax
[string] OnGetScriptCommands(
);
Parameters
None.
Return Value
An XML data string defining the script's commands. If no
commands are supported by the script, return an empty string. For
more information about the way to define the command's data, see
the ScriptInfo's
schema documentation.
Remarks
The script's commands can be defined statically in the
ScriptInfo.xml file or returned by
this function is the list can change at runtime. If a list of
commands is returned by this handler, it gets priority over the
list defined in ScriptInfo.xml.
The list of commands is used in windows such as the command
browser. Command names must be defined without the beginning "/"
character.
Example
Event handler returning a simple list of commands for the
script:
function OnGetScriptCommands()
{
var ScriptCommands = "<ScriptCommands>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>beep</Name>";
ScriptCommands += "<Description>Play a beep sound</Description>";
ScriptCommands += "</Command>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>flash</Name>";
ScriptCommands += "<Description>Flashes the window</Description>";
ScriptCommands += "<Parameters><flash count></Parameters>";
ScriptCommands += "</Command>";
ScriptCommands += "</ScriptCommands>";
return ScriptCommands;
}
Event Information
| Event Source |
Messenger Plus! |
| Availability |
Messenger Plus! Live 4.00 |
See Also
Messenger Plus! Events,
ScriptInfo's
schema documentation.
|