What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Copy what they say?

Copy what they say?
Author: Message:
upsfeup
Junior Member
**


Posts: 67
Joined: Feb 2005
RE: Copy what they say?
Here is my code!

There is one thing that can't be changed. Everytime you change the DP to display the "copycated" the picture is added to your DP list. Scripts don't have access to that list so we can't change it!

Also.. it checks for DP changes every 10 seconds.

code:
// Copycat v1.0

var copycat_target = '';
var old_name;
var old_psm;
var old_dp;
var CntDP_old = '';

function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    if(Message.substr(0, 8) == '!copycat'){
        if(copycat_target.length > 1){
            copycat_target = '';
            Messenger.MyName = old_name;
            Messenger.MyPersonalMessage = old_psm;
            Messenger.MyDisplayPicture = old_dp;
            Debug.Trace("No more copycat");
            MsgPlus.CancelTimer('CopyCatTimer');
            return '';
        }
         
        var contacts = new Enumerator(ChatWnd.Contacts);
        if(ChatWnd.Contacts.Count > 1)
            return '';    //No copycat to multi users. Find way to warn the user
        var e = contacts.item();
        copycat_target = e.Email;
       
        var CntDP = e.DisplayPicture;
        CntDP_old = CntDP;
        old_dp = Messenger.MyDisplayPicture;
        if(CntDP != "")     
            Messenger.MyDisplayPicture = CntDP;
        old_name = Messenger.MyName;
        Messenger.MyName = e.Name;
        var CntPM = e.PersonalMessage;
        old_psm = Messenger.MyPersonalMessage;
        if(CntPM)
            Messenger.MyPersonalMessage = CntPM;

        MsgPlus.AddTimer('CopyCatTimer', 10000);

        Debug.Trace("CopyCat " + copycat_target);
        return '';
    }
}

function OnEvent_ContactNameChange(Email, NewName)
{
    if(copycat_target == Email){
        Debug.Trace("Change Name to " + NewName);
        Messenger.MyName = NewName;
    }
}

function OnEvent_ContactPsmChange(Email, NewPsm)
{
    if(copycat_target == Email){
        Debug.Trace("Change Psm to " + NewPsm);
        Messenger.MyPersonalMessage = NewPsm;
    }
}

function OnEvent_ContactStatusChange(Email, NewStatus)
{
    if(copycat_target == Email){
        Debug.Trace("Change status to " + NewStatus);
        Messenger.MyStatus = NewStatus;
    }
}

function OnEvent_Timer(TimerId)
{
    if(TimerId == 'CopyCatTimer'){
        if(copycat_target != ''){
            var CntDP = Messenger.MyContacts.GetContact(copycat_target).DisplayPicture;
            if((CntDP != CntDP_old) && (CntDP != "") ){
                Messenger.MyDisplayPicture = CntDP;
                CntDP_old = CntDP;
                Debug.Trace("ChangeDP to " + CntDP);
            }
            MsgPlus.AddTimer('CopyCatTimer', 10000);
        }
    }
}


Code tag should maintain tabs.. :(
06-29-2006 12:59 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Copy what they say? - by SantaMayCry on 06-28-2006 at 11:10 PM
RE: Copy what they say? - by upsfeup on 06-28-2006 at 11:13 PM
RE: Copy what they say? - by SantaMayCry on 06-28-2006 at 11:18 PM
RE: Copy what they say? - by upsfeup on 06-28-2006 at 11:24 PM
RE: Copy what they say? - by SantaMayCry on 06-28-2006 at 11:32 PM
RE: Copy what they say? - by upsfeup on 06-29-2006 at 12:59 AM
RE: Copy what they say? - by Mr. Bougo on 06-29-2006 at 06:47 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