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:
Silva
New Member
*


Posts: 4
Joined: Jul 2006
O.P. Graident message
I took the Capital Letter script and tried editting it to always do graidents when I write, after my edits the code looks like this :
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
sMessage = sMessage.substr(0,1) + '[c=12]' + sMessage.substr(1) + '[/c=4]'
     return sMessage;
}

The problem with that is that the first letter is always 100% black, I tried playing with it alot but most of the time ethier the first letter just disapeared or the script just stopped working. All help will be a apreticated :).


Edit: It's not black , it uses my text color.

This post was edited on 07-03-2006 at 12:42 PM by Silva.
07-03-2006 12:20 PM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Graident message
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
  return '[c=12]' + sMessage + '[/c=4]';
}

That will create a gradient, starting at blue and ending at red

This post was edited on 07-03-2006 at 12:42 PM by Ezra.
[Image: 1-0.png]
             
07-03-2006 12:42 PM
Profile PM Web Find Quote Report
Silva
New Member
*


Posts: 4
Joined: Jul 2006
O.P. RE: Graident message
Thanks for your help :). It works fully now.
07-03-2006 12:45 PM
Profile E-Mail PM Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
RE: Graident message
thanks that works gr8

do you think its possible to have 3 colours?

like going Red>Black>Red ??
07-03-2006 01:19 PM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Graident message
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  return "[c=4]" + Message.substr(0,(Message.length/2)) + "[/c=1][c=1]" + Message.substr((Message.length/2)) + "[/c=4]";
}

That will work

This post was edited on 07-03-2006 at 02:01 PM by Ezra.
[Image: 1-0.png]
             
07-03-2006 01:40 PM
Profile PM Web Find Quote Report
craig2k5
Junior Member
**


Posts: 64
Joined: Feb 2006
RE: Graident message
thanks that does work... but if you try and do any emoticons it dont.. for instance if u try and do ":@" it will give u :[ @ lol
07-03-2006 01:57 PM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: Graident message
hmm, yeah, that's because it splits the message in 2 parts, if the emoticon is in the exact middel it will split it up :P

I also noticed that I disabled all commands with this script so I fixed that:

code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
  if (Message.substr(0,1) == "/")
  {
    return Message;
  }
  else
  {
    return "[c=4]" + Message.substr(0,(Message.length/2)) + "[/c=1][c=1]" + Message.substr((Message.length/2)) + "[/c=4]";
  }
}

This post was edited on 07-03-2006 at 02:02 PM by Ezra.
[Image: 1-0.png]
             
07-03-2006 02:01 PM
Profile PM Web Find Quote Report
Silva
New Member
*


Posts: 4
Joined: Jul 2006
O.P. RE: Graident message
You read my mind, I was just about to ask  how to do an if command so that if my message starts with / it wont apply the color :).

Edit: How would I go about making this script work only for certain emails? If you  could just give me a hint in the right direction I could probably write it my self.

This post was edited on 07-03-2006 at 03:54 PM by Silva.
07-03-2006 03:33 PM
Profile E-Mail PM Find Quote Report
Voldemort
Veteran Member
*****

Avatar

Posts: 3504
Reputation: 49
– / – / Flag
Joined: Jul 2005
Status: Away
RE: Graident message
With ezra's latest code, some emos like :O dont work when sent alone :(
*All posts are a purely speculative hypothesis based on abstract reasoning.
Not my daughter, you bitch!
[Image: ico-mollytrix16.gif]
07-03-2006 04:10 PM
Profile E-Mail PM Find Quote Report
Silva
New Member
*


Posts: 4
Joined: Jul 2006
O.P. RE: Graident message
Actualy all emo's don't work alone because they get split up, for example :P gets split up to : and P. If I knew how to script beter I'd do that if it starts with a " : " the script woulden't effect the first two characters. But now I'm still busy playing with it so that it only runs on the emails I choose so that people in my list that don't have plus won't  mad at me for using colors :P.

Edit: I played around with Ezera's email verification code found here : " http://shoutbox.menthix.net/showthread.php?tid=61888 "

And got this at the end:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
  var Contacts = ChatWnd.Contacts;
  var e = new Enumerator(Contacts);
  if (Contacts.Count == 1)
  {
    for (;!e.atEnd();e.moveNext())
    {
      var Contact = e.item();
      switch (Contact.Email)
      {
        case "email1@hotmail.com":
          run(ChatWnd, Message);
          break;
        case "email2@hotmail.com":
          run(ChatWnd, Message);
          break;
      }
    }
  }
}

function run(ChatWnd, Message)
{
 
  if (Message.substr(0,1) == "/")
  {
    return Message;
  }
  else
  {
    return "[c=4]" + Message.substr(0,(Message.length/2)) + "[/c=1][c=1]" + Message.substr((Message.length/2)) + "[/c=4]";
  {

}

If someone could please help me debug it, I just cant understand why it's not working :S .

This post was edited on 07-03-2006 at 04:26 PM by Silva.
07-03-2006 04:20 PM
Profile E-Mail PM 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