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

Pages: (2): « First « 1 [ 2 ] Last »
Graident message
Author: Message:
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
RE: Graident message
It's not working, for two reasons (that I can see). Firstly, you are using the event Message Recieved. I am pretty sure that you wantto do this when a Message is Sent, not Recieved.

Secondly, you aren't returning anything. The run function returns the Message with gradient to the event function, but the event function doesn't return it. You have to either assign it to a vriable and return it, or just return it directly.

eg
code:
      var Contact = e.item();
      switch (Contact.Email)
      {
        case "email1@hotmail.com":
          return run(ChatWnd, Message);
        case "email2@hotmail.com":
          return run(ChatWnd, Message);
      }

alternatively
code:
      var Contact = e.item();
      var toReturn = Message;//return the original if email isn't in list
      switch (Contact.Email)
      {
        case "email1@hotmail.com":
          toReturn = run(ChatWnd, Message);
          break;
        case "email2@hotmail.com":
          toReturn = run(ChatWnd, Message);
          break;
      }
      return toReturn;


I would use the first one, but whichever you understand and like better.
07-03-2006 11:37 PM
Profile PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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