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

help block system
Author: Message:
tyron
New Member
*


Posts: 5
Joined: Sep 2006
O.P. help block system
I'm trying to create a script that auto-blocks and specified user when I sign out and automatically unblocks it when I sign in...
I think it's useful if you have a person that you should only talk from one place (like work) and don't want to be bored at your home, for example..

The problem is that I'm having problems trying to auto-block when I sign out - the function OnEvent_Signout is executed AFTER the WLM is closed, so the function to block is not well executed...

That's what I made this far (as I'm brazilian, I might have forgotten to translate some variable... Although, I don't think it'd be a problem):

code:
var BlockedUser = "___@hotmail.com"; //here comes the target email
var meuEmail = "_______@hotmail.com"; //here comes mine email

function OnEvent_Initialize(MessengerStart)
{
Debug.Trace("Hello World!");
}

function OnEvent_Uninitialize(MessengerExit)
{
}


function OnEvent_MyStatusChange(NewStatus) {
    if(Messenger.MyEmail == meuEmail)
        {
            Contact = Messenger.MyContacts.GetContact(BlockedUser);
       
            if (NewStatus!=2) {
            Contact.Blocked = true;
            } else
            Contact.Blocked = false;
        }
}


function block(contato,status)
{
    if(status== "no")
    {
        contato.Blocked = false;
    } else {
        contato.Blocked = true;
    }
}

function OnEvent_SigninReady(Email)
{
    if(Messenger.MyEmail == meuEmail)
        {
            Contact = Messenger.MyContacts.GetContact(BlockedUser);
   
            block(Contact,"no");
        }

}


function OnEvent_Signout(Email)
{
    if(Messenger.MyEmail == meuEmail)
        {
            try
                {
                    Contact = Messenger.MyContacts.GetContact(BlockedUser);
                    block(Contact,"yes");
                }
            catch(err)
                {
                    Debug.Trace(" Error");
                }

        }
}



Thank you a lot
09-30-2006 02:28 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
help block system - by tyron on 09-30-2006 at 02:28 PM
RE: help block system - by Spunky on 09-30-2006 at 02:48 PM
RE: help block system - by tyron on 09-30-2006 at 03:18 PM
RE: help block system - by Spunky on 09-30-2006 at 03:29 PM
RE: help block system - by tyron on 09-30-2006 at 03:59 PM
RE: help block system - by Spunky on 09-30-2006 at 04:01 PM
RE: help block system - by tyron on 09-30-2006 at 04:06 PM
RE: help block system - by tyron on 10-03-2006 at 10:47 PM
RE: help block system - by deAd on 10-03-2006 at 11:16 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