What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script to parse user input

Script to parse user input
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Script to parse user input
quote:
Originally posted by wiseguyxp
I really want to start my command with a slash, but when I had tried to use the slash command, it said "The command you entered was not recognized."  I took a look at OnGetScriptCommands (as you suggested) and it pointed to me to ScriptInfo.xml.  After defining the command in ScriptInfo.xml, it all works fine.  Thanks a lot!
As I said before, the two things ("command not recognized" error and the OnGetScriptCommands() function) don't have anything to do with eachother.

OnGetScriptCommands() (or the equivalent in the ScriptInfo.xml which is indeed rarely used by scripters) simply lists your command in the command browser window which pops up when the user types a slash "/" in a conversation window. It does _not_ make the command 'recognizable' by Plus!, it simply adds the command to that list which has the sole purpose of displaying something to the user, nothing more.

You get the "command not recognized" error because you didn't tell Plus! that your script did recognize the text as a command. And that is done by returning something in the OnEvent_ChatWndSendMessage() function.

If you don't return something, Plus! will think that the command wasn't recognized by any installed and running script and will eventually show that error message after it has parsed that text to all the OnEvent_ChatWndSendMessage() functions in all the installed and running scripts.

To see an example of all that, see CookieRevised's reply to Gettin data from "/" commands.

PS: I didn't link to that before because (re)searching such things yourself is very vital to learn scripting in Plus!. :p

This post was edited on 12-07-2009 at 02:01 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-06-2009 04:51 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Script to parse user input - by wiseguyxp on 12-06-2009 at 01:22 AM
RE: Script to parse user input - by CookieRevised on 12-06-2009 at 02:06 AM
RE: Script to parse user input - by wiseguyxp on 12-06-2009 at 03:22 AM
RE: Script to parse user input - by NanaFreak on 12-06-2009 at 12:45 PM
RE: Script to parse user input - by CookieRevised on 12-06-2009 at 04:51 PM
RE: Script to parse user input - by wiseguyxp on 12-07-2009 at 05:46 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