What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » beginner scripter

beginner scripter
Author: Message:
danlett
New Member
*


Posts: 8
– / Male / –
Joined: Apr 2009
Status: Away
O.P. beginner scripter
Hello,

i want to write a script that open a chat window and send a message to the window.

function OnEvent_Initialize(MessengerStart)
{
Messenger.OpenChat('kassaidani@hotmail.com');
ChatWnd.SendMessage("message");
}
function OnEvent_Uninitialize(MessengerExit)
{
}

The debugger says that ChatWnd is not defined. What can I do?
04-26-2009 03:41 PM
Profile PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
38 / Male / Flag
Joined: Jul 2005
RE: beginner scripter
You have to define the ChatWnd Object before you can send messages to it.
Luckily this object can be provided by the Messenger.OpenChat() function.

javascript code:
function OnEvent_Initialize(MessengerStart)
{
ChatWnd = Messenger.OpenChat('kassaidani@hotmail.com');
ChatWnd.SendMessage("message");
}
function OnEvent_Uninitialize(MessengerExit)
{
}
it's untested, but it should work.
04-26-2009 04:04 PM
Profile PM Find Quote Report
danlett
New Member
*


Posts: 8
– / Male / –
Joined: Apr 2009
Status: Away
O.P. RE: beginner scripter
Oh thanks. :)
04-26-2009 05:51 PM
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