What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » If statements and editing a script

If statements and editing a script
Author: Message:
Burningmace
Junior Member
**


Posts: 20
Joined: Sep 2008
RE: If statements and editing a script
code:
function startsWithAlpha(message) {
    if(message.length == 0) { return false; }
    var alpha = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
    var firstChar = message.charAt(0);
    for(i = 0; i < alpha.length; i++) {
        if(alpha.charAt(i) == firstChar) {
            return true;
        }
    }
    return false;
}

This *should* work but I've not tested it and I've not coded in JS for ages.

This post was edited on 09-23-2008 at 11:47 PM by Burningmace.
09-23-2008 11:47 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
If statements and editing a script - by vanillaflavoured on 09-22-2008 at 09:43 PM
RE: If statements and editing a script - by Jesus on 09-23-2008 at 01:58 AM
RE: If statements and editing a script - by Burningmace on 09-23-2008 at 11:47 PM
RE: If statements and editing a script - by roflmao456 on 09-24-2008 at 12:13 AM
RE: If statements and editing a script - by Burningmace on 09-24-2008 at 12:46 AM
RE: RE: If statements and editing a script - by vanillaflavoured on 09-24-2008 at 12:20 PM
RE: If statements and editing a script - by roflmao456 on 09-24-2008 at 07:55 PM
RE: If statements and editing a script - by vanillaflavoured on 09-25-2008 at 10:41 AM
RE: If statements and editing a script - by Jesus on 09-25-2008 at 10:53 AM
RE: If statements and editing a script - by vanillaflavoured on 09-25-2008 at 11:22 AM


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