What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Selecting a chat window

Selecting a chat window
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Selecting a chat window
You can store the chat window in a variable on message sent/received and do it that way.

Example:
jscript code:
// Variable to store the chat window
var oChatWnd;

function OnEvent_ChatWndDestroyed(pChatWnd) {
    // If a chat window is closed check to see if it is the current stored window, if so remove it
    if (typeof oChatWnd === 'object' && oChatWnd.Handle === pChatWnd.Handle) oChatWnd = null;
}

function OnEvent_ChatWndSendMessage(pChatWnd, sMessage) {
    oChatWnd = pChatWnd;
}

function OnEvent_ChatWndReceiveMessage(pChatWnd, sOrigin, sMessage, nMessageKind) {
    oChatWnd = pChatWnd;
}

Therefore when you go to send a message using your script make sure you check that
jscript code:
typeof oChatWnd === 'object'
Or else your script will fail.
12-05-2008 02:38 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Selecting a chat window - by rukuro on 12-05-2008 at 01:36 AM
RE: Selecting a chat window - by matty on 12-05-2008 at 02:38 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