Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // SystemInfo 1.0 by Fike.
- // This script could be a useful example to developers.
- // Twitter = @_DrunkFox_.
- // Thanks to matty for helping me on my way to being an awesome scripter like him :)
- Debug.Trace('Loaded');
- function OnGetScriptCommands() {
- var commands = '<ScriptCommands>';
- commands+='<Command>';
- commands+='<Name>syshelp</Name>';
- commands+='<Description>Lists commands in SystemInfo.</Description>';
- commands+='<Parameters/>';
- commands+='</Command>';
- commands+='<Command>';
- commands+='<Name>sysinfo</Name>';
- commands+='<Description>Opens a window with information about WLM and Plus! Live.</Description>';
- commands+='<Parameters/>';
- commands+='</Command>';
- commands+='<Command>';
- commands+='<Name>wlmver</Name>';
- commands+='<Description>Send a message to whoever you are chatting with with the version of WLM you are currently using.</Description>';
- commands+='<Parameters/>';
- commands+='</Command>';
- commands+='</ScriptCommands>';
- Debug.Trace("Commands now available.")
- return commands;
- }
- function OnEvent_Initialize(MessengerStart) {
- MsgPlus.DisplayToast("SystemInfo", "Welcome to SysInfo! Do /syshelp in a chat window for commands!");
- }
- function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
- if (sMessage.toLowerCase() == "/syshelp") {
- MsgPlus.CreateWnd("SysHelp.xml", "SysHelp");
- return "";
- } else if (sMessage.toLowerCase() == "/wlmver") {
- return (Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);
- Debug.Trace(Messenger.Version.toFixed(1)+'.0'+Messenger.VersionBuild);
- } else if (sMessage.toLowerCase() == "/sysinfo") {
- MsgPlus.CreateWnd("SysInfo.xml", "SysInfo");
- var oSysHelpWnd = MsgPlus.CreateWnd()
- oSysHelpWnd.SetControlText('WlmVer', Messenger.Version)
- return "";
- }
- }
- function OnWndTestEvent_CtrlClicked(Wnd, ControlId)
- {
- if(ControlId == "BtnClose")
- Wnd.Close(1);
- if(ControlId == "BtnMoreInfo")
- MsgPlus.CreateWnd ("SysInfo.xml", "SysInfo");
- }
Advertisement
Add Comment
Please, Sign In to add comment