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

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
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Graident message - by Silva on 07-03-2006 at 12:20 PM
RE: Graident message - by Ezra on 07-03-2006 at 12:42 PM
RE: Graident message - by Silva on 07-03-2006 at 12:45 PM
RE: Graident message - by craig2k5 on 07-03-2006 at 01:19 PM
RE: Graident message - by Ezra on 07-03-2006 at 01:40 PM
RE: Graident message - by craig2k5 on 07-03-2006 at 01:57 PM
RE: Graident message - by Ezra on 07-03-2006 at 02:01 PM
RE: Graident message - by Silva on 07-03-2006 at 03:33 PM
RE: Graident message - by Voldemort on 07-03-2006 at 04:10 PM
RE: Graident message - by Silva on 07-03-2006 at 04:20 PM
RE: Graident message - by The Brain on 07-03-2006 at 11:37 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