to display toast on error:
code:
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message == "/WMP")
{
try{
ChatWnd.SendMessage("/run C:\\Program Files\\Windows Media Player\\wmplayer.exe");
MsgPlus.DisplayToast("WMP", "WMP is Loading...", 'notify.mp3', "", "");
}catch(err){
MsgPlus.DisplayToast("WMP", "Loading WMP failed", 'notify.mp3', "", "");
}
return "";
}
}
function OnEvent_Uninitialize(MessengerExit)
{
}