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

from caps to lowercase
Author: Message:
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: from caps to lowercase
quote:
Originally posted by MenthiX
code:
    if(CommandIs == "Caps") {
    return Message.replace(Message, Message.toUpperCase());
    }
The above code transforms it to uppercase, so i assume adding the following directly below that code will give you a transform it to all lowercase:
code:
    if(CommandIs == "Lower") {
    return Message.replace(Message, Message.toLowerCase());
    }

I'm sorry but that can be done better, just try this:
code:
if(CommandIs == "Caps") return Message.toUpperCase();

and for lowercase:
code:
if(CommandIs == "Lower") return Message.toLowerCase();


It is just nicer to use these one liners (as well as being quicker).  Realistically the code of the script could be better, but this is sufficient for the script as it is.

Oh and just so you know, it is perfectly fine to not use {} for an if statement when there is only one line for inside of it.

quote:
Originally posted by MenthiX
And to make it work in the menu, search for:

    code:    if(ControlId == "Caps") {
    var CommandIs = "Caps";
    new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
    }

Ande directly under that add:

    code:    if(ControlId == "Lower") {
    var CommandIs = "Lower";
    new ActiveXObject('WScript.Shell').RegWrite(MsgPlus.ScriptRegPath + Email + "\\command",CommandIs);
    }


This isn't correct.  This is for the radio controls in the menu but you will have to personally edit the XML to add these....  The script itself only has "options" and "About" in the menu.

PS. Sorry MenthiX for disassembling your post how I did, but I wanted to make sure all the correct and best information was given, I hope you don't mind too much, it wasn't my intention.

This post was edited on 05-23-2007 at 01:24 PM by markee.
[Image: markee.png]
05-23-2007 01:15 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
from caps to lowercase - by Jarrod on 05-23-2007 at 12:24 PM
RE: from caps to lowercase - by Menthix on 05-23-2007 at 12:31 PM
RE: RE: from caps to lowercase - by vikke on 05-23-2007 at 02:01 PM
RE: from caps to lowercase - by markee on 05-23-2007 at 01:15 PM
RE: from caps to lowercase - by Menthix on 05-23-2007 at 01:34 PM
RE: from caps to lowercase - by CookieRevised on 05-23-2007 at 06:56 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