What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Getting the Xth word of a sentence

Getting the Xth word of a sentence
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Getting the Xth word of a sentence
Are these commands you are sending or commands that your contact is sending to you?

Other option is to do something like this:

js code:
function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMsgKind){
    if (/^([\/|\!][^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) {
        if (RegExp.$1 === '!tfd' && RegExp.$2 === 'users') {
                // put some code here
        }
    }
}

This post was edited on 05-10-2010 at 05:59 PM by matty.
05-10-2010 05:49 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Getting the Xth word of a sentence - by Riko15 on 05-10-2010 at 03:06 PM
RE: Getting the Xth word of a sentence - by matty on 05-10-2010 at 03:51 PM
RE: RE: Getting the Xth word of a sentence - by Riko15 on 05-10-2010 at 04:28 PM
RE: Getting the Xth word of a sentence - by matty on 05-10-2010 at 04:43 PM
RE: RE: Getting the Xth word of a sentence - by Riko15 on 05-10-2010 at 05:31 PM
RE: Getting the Xth word of a sentence - by matty on 05-10-2010 at 05:49 PM
RE: RE: Getting the Xth word of a sentence - by Riko15 on 05-10-2010 at 06:14 PM
RE: Getting the Xth word of a sentence - by matty on 05-10-2010 at 08:02 PM
RE: Getting the Xth word of a sentence - by Adeptus on 05-11-2010 at 01:41 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