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

A Challenge!
Author: Message:
Nopraptor
New Member
*


Posts: 1
Joined: Sep 2007
O.P. Wink  A Challenge!
When i make my msn names, i like them to be original. something no one else does. and same goes with my fonts when i type. Ive heard theres a plugin that can change your font to a gradient colour. BUT heres the challenge! can it be done so that when your typing a message, only the first letter changes colour?! something like this...

(my name)
[c=4]J[/c][c=1]ordan[/c][c=4]T[/c][c=1]oner[/c]

If so, that would OWN. im no good at scripting myself, so i was wondering if anyones got the knack of scripting, try to have a go! :D email or add me if you need to talk to me about it

jordantoner2006@hotmail.co.uk
09-27-2007 05:04 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: A Challenge!
code:
function OnEvent_ChatWndSendMessage(PlusWnd, Message){
    if(Message.substr(0,1)!="\\"){
        Message = Message.split(" ");
        for(var s in Message){
            Message[s].substr(0,1) = "[c=4]"+Message[s].substr(0,1)+"[/c]";
        }
        return Message.join(" ");
    }
}

Should work, but gradients can't be put onto a single letter, so it's only a single colour
<Eljay> "Problems encountered: shit blew up" :zippy:
09-27-2007 05:17 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: A Challenge!
I didn't know you could "set" a substr()? :O

...
Oh yeh, that's because you can't. :P Try this instead of the "Message[s].substr(0,1) = ..." line:
code:
Message[s] = "[c=4]"+Message[s].charAt(0)+"[/c]"+Message[s].substr(1);
I more like to use charAt(0) instead of substr(0,1) because it's shorter and easier to understand. :) (the first character uh! ;))

However you should note that this will NOT work on words after a new-line or tab character. I'll see if I can do the same with replace combined with a function...

This post was edited on 09-28-2007 at 04:11 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-28-2007 04:09 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: A Challenge!
I did notice that after I posted it... I fixed it and developed the script and it has now been released :p

[Release] ColourZ
<Eljay> "Problems encountered: shit blew up" :zippy:
09-28-2007 06:04 PM
Profile 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