What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » SendMessage

SendMessage
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: SendMessage
I don't know the Scripting Documentation says you have to return something so that's the nicest way anyhoo.

And that way the string returned is very ugly.

So I made this: will write "/me is listening to %title% by %artist%"

code:
var string = new Array();

function OnEvent_ChatWndSendMessage(ChatWnd, sMessage)
{
  if (sMessage.match(/^\^currentmedia(\s+|$)/i) != null)
  {
    string = Messenger.MyCurrentMedia.split("\\");
    switch (string[0])
    {
      case "ITunes":
        return "/me is now playing " + string[4].substr(1) + " by " + string[5].substr(1);
        break;
      case "":
        return "/me is now playing " + string[4].substr(1) + " by " + string[5].substr(1);
        break;
      default:
        return "/me is now playing " + Messenger.MyCurrentMedia;
    }
  }
  else
  {
    return sMessage;
  }
}
[Image: 1-0.png]
             
07-06-2006 10:53 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
SendMessage - by logie on 07-06-2006 at 10:13 PM
RE: SendMessage - by Dhaya on 07-06-2006 at 10:24 PM
RE: SendMessage - by foaly on 07-06-2006 at 10:25 PM
RE: SendMessage - by Ezra on 07-06-2006 at 10:32 PM
RE: RE: SendMessage - by foaly on 07-06-2006 at 10:35 PM
RE: SendMessage - by Ezra on 07-06-2006 at 10:53 PM
RE: SendMessage - by logie on 07-07-2006 at 12:05 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On