What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need a Script maker.

Need a Script maker.
Author: Message:
tribbium
Junior Member
**


Posts: 34
Reputation: 3
– / Male / Flag
Joined: Jul 2008
RE: Need a Script maker.
Thankfully for you, I was bored and sick of looking at jquery stuff so here is your script in its entirety:

Packaged file is below the code.

code:
function OnEvent_ChatWndSendMessage (ChatWnd, message){
    var translated_message = "";

    var non_words = /\W/g;
    var separators = message.match (non_words);
    if (separators == null){
        separators = new Array ("");
    }
    else if (message.indexOf (separators [0]) != 0){ //checks for leading non-word
        separators.unshift ("");
    }
    var words = message.split (non_words);
   
    for (var i in words){
        translated_message += separators [i];
        //vague instructions, made first letter of each word capitalized
        words [i] = words [i].toLowerCase ();
       
        if (words [i].length == 1){
            translated_message += words [i];
        }else if (words [i].length < 7){
            translated_message += words [i].charAt (words [i].length - 1).toUpperCase ()
                            + words [i].charAt (words [i].length - 2)
                            + words [i].substr (0, words [i].length - 2);
        }else{
            translated_message += words [i].charAt (words [i].length - 2).toUpperCase ()
                            + words [i].substr (0, words [i].length - 2);
        }
    }
    if (separators.length > words.length){ //checks for trailing non-word
        translated_message += separators [separators.length - 1];
    }
    return translated_message;
}

.plsc File Attachment: (870 bytes)
This file has been downloaded 86 time(s).
Are you and your friends trivia enthusiasts? Download Tribbium! http://www.msgpluslive.net/scripts/view/427-Tribb...ia-Gaming-System)/

Download questions for Tribbium here:
http://www.tribbium.tk
08-29-2009 10:47 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need a Script maker. - by dannyparker on 08-27-2009 at 10:02 PM
RE: Need a Script maker. - by tribbium on 08-29-2009 at 10:47 AM
RE: Need a Script maker. - by dannyparker on 08-29-2009 at 02:19 PM
RE: Need a Script maker. - by dannyparker on 08-29-2009 at 02:36 PM
RE: Need a Script maker. - by Matti on 08-29-2009 at 06:19 PM


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