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:
vanillaflavoured
New Member
*


Posts: 8
34 / Male / Flag
Joined: Sep 2008
O.P. RE: RE: If statements and editing a script
quote:
Originally posted by Burningmace
To uppercase the first character after you've detected that the fist character is indeed within the range a-Z you can do this:

code:
message = message.charAt(0).toUpper() + message.substr(1);


This bit I had already sorted out.

Basically, here's what I already have and yes I know this all could probably be done MUCH more simply but like I said, I normally program databases in VB so I have NO experience with JScript etc.

code:
function OnEvent_ChatWndSendMessage(pChatWnd, Message){

var endChar = Message.charAt(Message.length-1)

switch (endChar)
{
case "!":
  endChar = ""
  break;
case "?":
  endChar = ""
  break;
case ".":
  endChar = ""
  break;
case ")":
  endChar = ""
  break;
case ":":
  endChar = ""
  break;
default:
  endChar = "."
}

Message = Message.substr(0,1).toUpperCase() + Message.substr(1) + endChar
    return Message; 

}
09-24-2008 12:20 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