What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » why won't this work?

why won't this work?
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: why won't this work?
Also why return a command if you can do it directly with the script?

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  if (Message.match(/^bye$/i) != null)
  {
    Messenger.Signout();
    return "";
  }
  else if (Message.match(/^away$/i) != null)
  {
    Messenger.MyStatus = 7; //Set status to Away;
    return "";
  }
  else if (Message.match(/^back$/i) != null)
  {
    if (ChatWnd.EditChangeAllowed)
    {
      return "Online";
    }
    else
    {
      Debug.Trace("Could not return a value");
      return "";
    }
  }
  else
  {
    if (ChatWnd.EditChangeAllowed)
    {
      return Message;
    }
    else
    {
      Debug.Trace("Could not return a value");
      return "";
    }
  }
}

Uses the direct functions and uses regex to compare the Message.

EDIT:

AND it returns the complete Message if anything else was said ;)

This post was edited on 10-19-2006 at 04:49 PM by Ezra.
[Image: 1-0.png]
             
10-19-2006 04:43 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
why won't this work? - by Jimbo on 10-19-2006 at 04:22 PM
RE: why won't this work? - by markee on 10-19-2006 at 04:25 PM
RE: why won't this work? - by Felu on 10-19-2006 at 04:25 PM
RE: why won't this work? - by Shondoit on 10-19-2006 at 04:26 PM
RE: why won't this work? - by Jimbo on 10-19-2006 at 04:27 PM
RE: why won't this work? - by Felu on 10-19-2006 at 04:28 PM
RE: why won't this work? - by Jimbo on 10-19-2006 at 04:31 PM
RE: why won't this work? - by Ezra on 10-19-2006 at 04:43 PM
RE: why won't this work? - by Jimbo on 10-19-2006 at 04:44 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