What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Confused by the documentation... bear with me.

Confused by the documentation... bear with me.
Author: Message:
citricsquid
New Member
*

<div style="sexy;100%">

Posts: 13
33 / Male / Flag
Joined: Sep 2008
O.P. Confused by the documentation... bear with me.
I've read through the documentation, but I can't find a clear example of what I want.

I type /hello something and then it runs the function hello and the variable words are assigned "something"

so, /hello starts the command, I know how to do that, but I'm confused by the example.

I have the following in a seperate JS file:

code:
function TestCommand(Wnd, Params)
{
    Debug.Trace("TestCommand has been called");

    var array = VBArray(Params).toArray();
    for(i = 0; i < array.length; i++)
        Debug.Trace(" Parameter: " + array[i]);

    return "";
}


But when I type "/TestCommand fhfhf" it says TestCommand doesn't exist? Have I broken it some how?

I'm rather in a muddle. I have the script doing what I want, it's just setting it up so /script VARIABLE works.
09-24-2008 07:51 PM
Profile PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Confused by the documentation... bear with me.
quote:
Originally posted by citricsquid
so, /hello starts the command, I know how to do that

actually, it doesn't :p

look up ongetscriptcommands
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
09-24-2008 08:01 PM
Profile PM Web Find Quote Report
citricsquid
New Member
*

<div style="sexy;100%">

Posts: 13
33 / Male / Flag
Joined: Sep 2008
O.P. RE: RE: Confused by the documentation... bear with me.
quote:
Originally posted by ShawnZ
quote:
Originally posted by citricsquid
so, /hello starts the command, I know how to do that

actually, it doesn't :p

look up ongetscriptcommands

arrr, okay, I'll check that out :D
ty.

I can't find anything about this in the documentation? Are you sure it's the correct function?

This post was edited on 09-24-2008 at 08:14 PM by citricsquid.
09-24-2008 08:10 PM
Profile PM Web Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Confused by the documentation... bear with me.
quote:
Originally posted by citricsquid
quote:
Originally posted by ShawnZ
quote:
Originally posted by citricsquid
so, /hello starts the command, I know how to do that

actually, it doesn't :p

look up ongetscriptcommands

arrr, okay, I'll check that out :D
ty.

I can't find anything about this in the documentation? Are you sure it's the correct function?
it is correct.

Events Reference > Messenger Plus! Events > OnGetScriptCommands

;)
[quote]
Ultimatess6
: What a noob mod
09-24-2008 08:44 PM
Profile PM Web Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
38 / Male / Flag
Joined: Jul 2005
RE: Confused by the documentation... bear with me.
quote:
Originally posted by roflmao456

it is correct.

Events Reference > Messenger Plus! Events > OnGetScriptCommands

Actually, that won't make the command work. It'll only make it show up in the list that appears when you type a / in the chat window.

To make the command call a function you'll have to catch the command and its parameters in OnEvent_ChatWndSendMessage and make it call a function yourself.
Man is least himself when he is in his own person. Give him a mask and he will tell you the truth. (Oscar Wilde)
09-25-2008 12:01 AM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Confused by the documentation... bear with me.
yes, but the documentation for ongetscriptcommands refers you to chatwndsendmessage, whereas chatwndsendmessage doesn't refer you to ongetscriptcommands :p
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
09-25-2008 02:16 AM
Profile PM Web Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
35 / Male / Flag
Joined: Oct 2004
RE: Confused by the documentation... bear with me.
But if ongetscriptcommands in itself answers no part of the original post then why not direct them straight to chatwndsendmessage?
09-25-2008 02:22 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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