What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » scrips that don't work

scrips that don't work
Author: Message:
paddysteed
New Member
*


Posts: 2
28 / Male / Flag
Joined: Dec 2007
O.P. scrips that don't work
i have made a script and don't know why it doesn't work can someone please help me
code:
function OnEvent_ChatWndSendMessage(chat_created)
{
SendMessage("/usay hi" + MyName);

}

also i don't know what the brackets after OnEvent_ChatWndSendMessage are for (i made the ones there up as a guess)

This post was edited on 12-10-2007 at 07:27 PM by paddysteed.
12-10-2007 07:25 PM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
RE: scrips that don't work
I think what you really need to do is study a little more.  You're missing some of the obvious stuff.  I don't really understand what you're trying to script - can you maybe give a little more information and maybe you could get some more help.  I'd recommend you try to download the Scripting Doc from the scripts database.

Regarding your query about the brackets, they contain the actual data extracted from your function (in this case OnEvent_ChatWndSendMessage)

[string] OnEvent_ChatWndSendMessage( [object] ChatWnd, [string] Message );

OnEvent_ChatWndSendMessage - This is your function - will be called when you send a message.

ChatWnd - This will be the chat window ID - this is unique for each window, and so refers specifically to the window which called the event.

Message - This is simply the message you sent.


So, if your intention is to pretend to be your contact for every message you send the script would be similar to this:

function OnEvent_ChatWndSendMessage(ChatWnd, SentMessage)
{
  ChatWnd.SendMessage("/usay " + SentMessage)
}


(For the better scripters out there... please feel free to explain better - or more importantly correct me if I'm wrong - I'm really not too sure about any of this myself :S)
[Image: adsig.jpg]
12-10-2007 08:57 PM
Profile E-Mail PM Web Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: scrips that don't work
code:
function OnEvent_ChatWndCreated(ChatWnd){
   ChatWnd.SendMessage("/usay hi "+Messenger.MyName);
}

This is the code you are after I do believe.  You have to use the Messenger object to get out your name.  I'm sure you will pick it up quickly ;)
[Image: markee.png]
12-11-2007 07:39 AM
Profile PM Find Quote Report
paddysteed
New Member
*


Posts: 2
28 / Male / Flag
Joined: Dec 2007
O.P. RE: scrips that don't work
cool thanks
so are the brackets for what group the action is in

p.s. is it possible to open files i know you can open .js files but i want to open other ones

This post was edited on 12-11-2007 at 05:22 PM by paddysteed.
12-11-2007 05:17 PM
Profile E-Mail 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