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

Removing DPs
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: Removing DPs
There have been numerous topics about an "OnEvent_DPChanged" function. There is currently a known solution:

JScript code:
var DP = ""; // Global variable specifying the user's DP
var Started = false; // Just a small check variable
var Time = 60000; // 1 minute

function OnEvent_Initialize(bool) {
    if(Messenger.MyStatus > 0) {
        // Assign DP the current picture
        DP = Messenger.MyDisplayPicture;
        // No need to do it twice
        Started = true;
        // Add the timer so we can check in one minute
        MsgPlus.AddTimer("TmrCheckDP" + Messenger.MyUserId,Time);
    }
}

// If Started is false, we'll call the Initialise function again
function OnEvent_SigninReady(Email) {
    if(!Started) OnEvent_Initialize(false);
}

function OnEvent_Timer(ID) {
    switch(ID) {
        case "TmrCheckDP" + Messenger.MyUserId:
            if(DP !== Messenger.MyDisplayPicture) {
                // Callback function
                OnEvent_MyDPChange(DP);
                // Re-assign DP
                DP = Messenger.MyDisplayPicture;
                // Re-add the timer so we can keep checking
                MsgPlus.AddTimer(ID,Time);
        return true;
    }
    return false;
}

function OnEvent_MyDPChange(OldDP) {
    // Do what you want to do here; e.g. delete the OldDP;
    // The 'new' DP can be accessed through Messenger.MyDisplayPicture
}
04-03-2009 02:23 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Removing DPs - by ArkaneArkade on 04-01-2009 at 11:02 PM
RE: Removing DPs - by kezz on 04-02-2009 at 04:31 AM
RE: Removing DPs - by SmokingCookie on 04-02-2009 at 07:51 PM
RE: Removing DPs - by ArkaneArkade on 04-03-2009 at 12:33 PM
RE: Removing DPs - by SmokingCookie on 04-03-2009 at 02:23 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