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

Reply to any message
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Reply to any message
The problem is he wants it to reply to the first message they send ONLY if the window wasn't open before.

js code:
// Create an object container to store the chat window object
var oChatWnds = {};

// Store the chat window object in our object container when it is opened
function OnEvent_ChatWndCreated(oChatWnd) {
    oChatWnds[oChatWnd.Handle] = {};
}

// Remove the variable from the object if the window is closed
function OnEvent_ChatWndDestroyed(oChatWnd) {
    delete oChatWnds[oChatWnd.Handle];
}

// If we send a message remove the chat window from the object container
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
    delete oChatWnds[oChatWnd.Handle];
}

// If we receive a message and the chat window exists in the object container
function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMessageKind) {
    if (typeof oChatWnds[oChatWnd.Handle] === 'object') {
        // Send the message
        oChatWnd.SendMessage('hai');
        // Remove the chat window from the object container
        delete oChatWnds[oChatWnd.Handle];
    }
}

Untested code but give it a shot.

This post was edited on 12-03-2009 at 02:09 PM by matty.
12-03-2009 02:09 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Reply to any message - by SourSpud on 12-03-2009 at 05:59 AM
RE: Reply to any message - by matty on 12-03-2009 at 12:47 PM
RE: Reply to any message - by Spunky on 12-03-2009 at 12:51 PM
RE: Reply to any message - by matty on 12-03-2009 at 02:09 PM
RE: Reply to any message - by SourSpud on 12-03-2009 at 07:31 PM
RE: Reply to any message - by Spunky on 12-03-2009 at 08:36 PM
RE: Reply to any message - by SourSpud on 12-03-2009 at 09:05 PM
RE: Reply to any message - by Mnjul on 12-03-2009 at 09:26 PM
RE: Reply to any message - by SourSpud on 12-03-2009 at 09:33 PM
RE: Reply to any message - by Spunky on 12-03-2009 at 09:36 PM
RE: Reply to any message - by SourSpud on 12-03-2009 at 09:42 PM
RE: Reply to any message - by matty on 12-03-2009 at 10:06 PM


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