What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Block MSN Contact on a Schedule Basis

Block MSN Contact on a Schedule Basis
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Block MSN Contact on a Schedule Basis
Noticed some problems... I'm back from work now so I can actually test as I go through this time ;)



Re-structured code below. start_hour, start_minute, stop_hour and stop_minute represent a 24 hour clock (ie. 1 = 1AM, 13 = 1PM)

I forgot to define a couple of things and forgot the OnEvent_Initialize function... Works fine for me atm, just gonna make interface and add support for multiple schedules.

code:
var email = "nospam@hotmail.co.uk"; //Their Email
var start_hour = 1; //Time to block contact
var start_minutes = 57; //Time to block contact
var stop_hour = 1; //Time to unblock contact
var stop_minutes= 58; //Time to unblock contact

function OnEvent_Timer(tID){
    var d = new Date();
    var hour = d.getHours(); //fixed typo ;)
    var minutes = d.getMinutes();
    var Contacts = Messenger.MyContacts; //Forgot to define it :p
    if(hour>=start_hour&&minutes>=start_minutes){
            var Contact = Contacts.GetContact(email);
            if(hour<=stop_hour&&minutes<stop_minutes){
                Contact.Blocked = true
                Debug.Trace("Blocked: "+email);
            }else{
                Contact.Blocked = false;
                Debug.Trace("Un-Blocked: "+email);
            }       
    }
    MsgPlus.AddTimer(tID, 10000);
}

function OnEvent_SigninReady(){
    MsgPlus.AddTimer("block",1000);
}

function OnEvent_Initialize(){
    if(Messenger.MyStatus > 1){
        OnEvent_SigninReady();
    }
}




Been working on the interface and so on. I've made the script multi-user (using UserIDs to distinguish between users) and all emails stored in the registry are converted to their userIDs.

[Image: attachment.php?pid=844525]

.png File Attachment: preview.png (11.95 KB)
This file has been downloaded 782 time(s).

This post was edited on 08-24-2007 at 03:54 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
08-24-2007 01:03 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Block MSN Contact on a Schedule Basis - by ~*McoreD*~ on 08-23-2007 at 10:21 AM
RE: Block MSN Contact on a Schedule Basis - by Spunky on 08-23-2007 at 02:19 PM
RE: Block MSN Contact on a Schedule Basis - by ~*McoreD*~ on 08-23-2007 at 11:45 PM
RE: Block MSN Contact on a Schedule Basis - by vikke on 08-23-2007 at 11:57 PM
RE: Block MSN Contact on a Schedule Basis - by ~*McoreD*~ on 08-24-2007 at 12:02 AM
RE: Block MSN Contact on a Schedule Basis - by Spunky on 08-24-2007 at 01:03 AM
RE: Block MSN Contact on a Schedule Basis - by ~*McoreD*~ on 08-24-2007 at 10:06 AM
RE: Block MSN Contact on a Schedule Basis - by aNILEator on 08-24-2007 at 12:06 PM
RE: Block MSN Contact on a Schedule Basis - by ~*McoreD*~ on 09-05-2007 at 11:01 AM
RE: Block MSN Contact on a Schedule Basis - by Spunky on 09-05-2007 at 11:20 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