What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Script to make sent messages gradient

Pages: (4): « First « 1 2 3 [ 4 ] Last »
[Request] Script to make sent messages gradient
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Request] Script to make sent messages gradient
quote:
Originally posted by hmaster
Or you could split the message into 2 parts and do
[c=1]FirstPart[/c=2][c=2]SecondPart[/c=3]
Should be easy to count the number of chars divide by two and substr it *-)

var Color1 = 1;
var Color2 = 2;
var Color3 = 3;

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
   var part1 = Message.substr(0, Math.floor(Message.length / 2));
   var part2 = Message.substr(Math.floor(Message.length / 2));
   return "[c=" + Color1 + "]" + part1 + "[/c=" + Color2 + "][c=" + Color2 + "]" + part2 + "[/c=" + Color3 +"]";
}
06-27-2006 05:13 PM
Profile PM Find Quote Report
Dally
New Member
*


Posts: 7
Joined: Jun 2006
RE: RE: [Request] Script to make sent messages gradient
quote:
Originally posted by t_pass6
I don't think that there is a way to know if a contact has Messenger Plus or not, you just have to add the contacts who have MsgrPlus to the Switch cases list, and they will see it, but if someone doesn't have his adress in the cases list the message will be sent like a normal message (default case). There is also a small modification of the code ezra made, because you have to check if the message is a command or not. You just have to add a condition to the Replace_Text function like this :
code:
function Replace_Text(Color1, Color2, Message, MsgOutput)
{
      if (Message.charAt(0) == '/')
{
return Message;
}
      else{
  return "[c=" + Color1 + "]" + Message + "[/c=" + Color2 + "]";
}
}


I don't undastnd wha u mean by add the contacts who have
messenger plus live to a cases list.

Which cases list is this???
06-27-2006 07:14 PM
Profile E-Mail PM Find Quote Report
t_pass6
New Member
*


Posts: 12
Joined: Jun 2006
O.P. RE: [Request] Script to make sent messages gradient
Further in the code you have a Switch function, it's like an if then else structure but a lot simpler. As you can see after the Switch you have an enumeration of case "xxx@yyy.zzz" foloowed by a call of the Repkace_Text function. The number of the cases can beeverything you want. If you want that your contact see your messages gradient you just have to add
code:
case "aaa@bbb.ccc":
     Color1 = "#0000FF";
     Color2 = "#FF0000";
     return Replace_Text(Color1, Color2, Message, MsgOutput);
     break;

This must be done for every contact you want to send gradient messages to. If you don't want a contact to receive gradient messages, you just have to do nothing, it his adress isn't in the "case" list, he won't receive gradient messages. That was what I meant by the cases list.

This post was edited on 06-27-2006 at 09:03 PM by t_pass6.
06-27-2006 09:02 PM
Profile E-Mail PM Find Quote Report
Dally
New Member
*


Posts: 7
Joined: Jun 2006
RE: [Request] Script to make sent messages gradient
Oh I see what u mean now.

I tried that but it never worked for me, contacts in my cases list still
couldn't see the gradient text for some reason :S

Thx newys mate :)
06-28-2006 11:58 AM
Profile E-Mail PM Find Quote Report
Pages: (4): « First « 1 2 3 [ 4 ] 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