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

Computer Details script
Author: Message:
Pinecone
New Member
*

Avatar
Coffee Powered

Posts: 9
34 / Male / Flag
Joined: Dec 2008
RE: Computer Details script
I think that a switch statement would not be the best for someone who is just learning JScript as he will probably want multiple commands of variable length, which will make a switch statement difficult to manage.

Try this:

code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind) {

    // In the following line, note that 10 is the length of the string '!processor'
    if (Message.substring(0, 10).toLowerCase() == '!processor') {
        // Put code here to send information about your processor.
    }

    // again, 9 refers to the length of '!graphics'
    if (Message.substring(0, 9).toLowerCase() == '!graphics') {
        // Put code here to send information about your graphics card.
    }
   
    return Message;
}


Note that if you add a return statement anywhere else in there, you should return Message so you know what your partner said.

This post was edited on 12-23-2008 at 06:52 PM by Pinecone.
12-23-2008 03:34 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Computer Details script - by mrfireman on 12-22-2008 at 09:26 PM
RE: Computer Details script - by roflmao456 on 12-23-2008 at 12:32 AM
RE: Computer Details script - by mrfireman on 12-23-2008 at 08:10 AM
RE: Computer Details script - by Pinecone on 12-23-2008 at 03:34 PM
RE: Computer Details script - by mrfireman on 12-23-2008 at 05:19 PM
RE: Computer Details script - by Lou on 12-23-2008 at 05:40 PM
RE: Computer Details script - by vaccination on 12-23-2008 at 05:46 PM
RE: Computer Details script - by Lou on 12-23-2008 at 05:51 PM
RE: Computer Details script - by warmth on 11-14-2009 at 02:34 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