What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Need some help with script

Need some help with script
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Need some help with script
js code:
// declare an object container
var objChatWnd = {};

// store the last message sent into our container
function OnEvent_ChatWndSendMessage(oChatWnd, sMessage) {
    objChatWnd[oChatWnd.Handle] = sMessage;
}

function OnEvent_ChatWndReceiveMessage(oChatWnd, sOrigin, sMessage, nMessageKind) {
    // check if the message received is our message
    if (objChatWnd[oChatWnd.Handle] === sMessage) {
        // if it is delete the object from the container
        delete objChatWnd[oChatWnd.Handle];
        // return the message to the window
        return sMessage;       
    }
   
    // declare a variable
    var blnIgnoreContact = false;
    // loop through all contacts in the chat
    for (var oContact = new Enumerator(oChatWnd.Contacts); !oContact.atEnd(); oContact.moveNext()) {
        // check the users email
        if (oContact.item().Email === 'gregorsturm12@hotmail.com') {
            // if it matches then set our variable to true
            blnIgnoreContact = true;
        }
    }
   
    // after looping through all contacts check our variable
    if (blnIgnoreContact === true) {
        // send a message if the contact was found
        oChatWnd.SendMessage('You are ignored');
    }
}

This post was edited on 02-11-2010 at 08:45 PM by matty.
02-11-2010 08:44 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Need some help with script - by Barathrum on 02-11-2010 at 07:45 PM
RE: Need some help with script - by Mnjul on 02-11-2010 at 07:51 PM
RE: Need some help with script - by Barathrum on 02-11-2010 at 08:31 PM
RE: Need some help with script - by matty on 02-11-2010 at 08:44 PM
RE: Need some help with script - by Matti on 02-11-2010 at 09:00 PM
RE: Need some help with script - by matty on 02-11-2010 at 09:12 PM
RE: Need some help with script - by Barathrum on 02-12-2010 at 11:59 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