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

certain character colour
Author: Message:
thehealey
New Member
*


Posts: 2
Joined: Aug 2009
O.P. Huh?  certain character colour
Hi, i have a little bit of knowledge in javascript and such and I'm just wondering if it would be possible to have an add on that can change the font colour of certain characters. So for instance every time I type a "e" it would be in an orange font where as all the other letters would be my normal blue.

I think it would be cool if like all the numbers and symbols were in the different colour and that by editing the script i could add/remove what characters are in the different colour and what the hexcode of the colour is.

I've searched round the forum a bit and there doesn't seem to be much on this and I'm just wondering if its possible? Thankyou for your time.

This post was edited on 08-27-2009 at 01:50 PM by thehealey.
08-26-2009 02:43 PM
Profile E-Mail PM Find Quote Report
thehealey
New Member
*


Posts: 2
Joined: Aug 2009
O.P. Huh?  RE: certain character colour
So I've been learning a bit of scripting to help me do this and I've come to the conclusion I should use the ChatWndEditKeyDown event.  and i've got as far as this:

code:
function OnEvent_ChatWndEditKeyDown( ChatWnd, vkKey, bCtrl, bShift ) {
    if ((vkKey == 0x4D /* VK_RETURN */) && (bCtrl == false) && (bShift == false))
            {

It's just now I don't know how to change the colour of the character, I've identified the character is the letter "m" but how can I change the colour of the letter?

I'm not sure if I'm using the right event, maybe i should be using the ChatWndSendMessage event instead to read through every character and replace the "m"s with the different coloured "m" characters, i just figured that would be slower than using the ChatWndEditKeyDown method and also means the colour affect would only appear in the converssation itself and not the box i enter text into on msn. Please please please help, this is starting to go over my head.

This post was edited on 08-27-2009 at 01:49 PM by thehealey.
08-27-2009 01:48 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: certain character colour
It would be easier to do it this way

js code:
function OnEvent_ChatWndSendMessage ( pChatWnd , sMessage ) {
    return sMessage.replace ( /m/g , '[c=2]m[/c]' );
}

This post was edited on 08-27-2009 at 02:44 PM by matty.
08-27-2009 02:44 PM
Profile E-Mail PM Find Quote Report
« 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