Shoutbox

How to use <Parameters> - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: How to use <Parameters> (/showthread.php?tid=76356)

How to use <Parameters> by johny65 on 07-27-2007 at 06:39 AM

Hello everybody! Well, I'm new here and in this of MP! Scripts. So I hope you help me, jajaja.

I want to know how to use <Parameters> in the event OnGetScriptCommands(). MsgPlus! documentation has the following example:

"<Parameters>&lt;flash count&gt;</Parameters>";

but I don't understand what is "&lt;flash count&gt;".

I hope you help!
Thanks! ;)


RE: How to use <Parameters> by Mnjul on 07-27-2007 at 12:40 PM

It's the text shown right to your command in the Enter Text area if your user selects your command in the command explorer (the one that pops up when you press / )

In xml, &lt; represents < while &gt; represents > literally (to distinguish those symbols from the markup tags)


RE: How to use <Parameters> by matty on 07-27-2007 at 12:49 PM

It is a little hard to explain but when you select the command from the drop down (once you type /) it will display the parameter.

For instance

/command <flash count>

function OnEvent_ChatWndSendMessage(oChatWnd, sMessage){
    if (/^\/([^\s\/]+)\s*([\s\S]*)$/.exec(sMessage) !== null) {
        var Command = RegExp.$1.toLowerCase();
        var Param = RegExp.$2;
}

Using that function will split the message into 2 variables, Command and Param.

If you Debug.Trace(Param) you will see that it is <flash count>.


RE: How to use <Parameters> by johny65 on 07-28-2007 at 02:15 AM

I have solved my problem.
Thank you very much!