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:
rukuro
New Member
*


Posts: 1
35 / Male / Flag
Joined: Dec 2008
O.P. Selecting a chat window
I am looking for a way to find out what window was selected. I was looking for something like a onmouseclick event.

Basically I have created a new window that pops up with a few buttons, depending on the button a different message is sent. The window is selected if a message was just received from them or I send a message, or alternatively if they use the menu I get the window selection via OnEvent_MenuClicked.

What other options are there that I can use? I am somewhat new to this and have searched but have been unable to find anything so far.

Thanks in advance.
Programmer Wannabe
12-05-2008 01:36 AM
Profile E-Mail PM Web Find Quote Report
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 »


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