Well this isn't what i want to do timbothegreat. I just want to have specific gradient for each contact who wants to see it. And I also don't want to use it in chat with multiple contacts. I was thinking about something like this:
code:
var Color1 = null;
var Color2 = null;
var MsgOutput = null;
function Replace_Text(Color1, Color2, Message, MsgOutput)
{
MsgOuput = "[c=" + Color1 + "]" + Message + "[/c=" + Color2 + "]";
}
function OnEvent_ChatWndSendMessage(Chatwnd, Message)
{
var Contactnum = Enumerator(ChatWnd.Contacts);
if (Contactnum < 3)
{
MsgOutput = Message
if (Contact.Email == xxx@yyy.zzz)
{
Color1 = "#000000";
Color2 = "#FFFFFF";
Replace_Text(Color1, Color2, Message, MsgOutput) ;
}
}
return MsgOutput;
}
Seems simpler to me.