Shoutbox

Selective Talker - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Selective Talker (/showthread.php?tid=64151)

Selective Talker by mlevit on 07-28-2006 at 02:43 PM

Hey,

I have taken Selective Talker and changed a few things around in it. I had made it for my girlfriend so that she can use it with ease.

So i had implemented a menu where you can select Block All / Unblock All instead of !blockall / !unblockall in the message window.

I don't want to officially submit this because 90% of the work was done by Anthony Leach the maker of Selective Talker so i just wanted to put this out here so maybe Anthony Leach could modify the original script with the new menu i've done.

Changed the name a bit too :P

Selective Chatting


RE: Selective Talker by RaceProUK on 07-28-2006 at 02:45 PM

The fact that you've credited the original author already puts you in good stead [Image: msn_wink.gif]

I shall reward you with positive rep.


RE: Selective Talker by mlevit on 07-28-2006 at 02:54 PM

Thanks RaceProUK, I obviously didn't write the whole program mainly because i cannot be bothered reading through the API :D

Maybe when i have time later ill read through it, see what cool things i can come up with.


RE: Selective Talker by Intosia on 07-28-2006 at 03:43 PM

I also modified that script so it remembered who was blocked before :)

If anyone wants that version, yell


RE: Selective Talker by mlevit on 07-28-2006 at 10:27 PM

quote:
Originally posted by Intosia
I also modified that script so it remembered who was blocked before :)

If anyone wants that version, yell


Oh mate, that's fantastic. I was set to do that this morning.

If you could send your version too m_levit@optusnet.com.au and maybe just mark your added code that would be great.
RE: Selective Talker by Intosia on 07-29-2006 at 10:11 AM

Ill post the code here...


code:
var blocked = "False";
var BlockedContacts = new Array()

function OnEvent_ChatWndCreated(ChatWnd) {
    var e = new Enumerator(ChatWnd.Contacts);
    var Contact = e.item();
    Contact.Blocked = "False";
}

function OnGetScriptMenu(Location) {
    var ScriptMenu = "<ScriptMenu>";

        ScriptMenu += "<MenuEntry Id=\"mnuBlockall\">Block all!</MenuEntry>";
        ScriptMenu += "<Seperator/>";
        ScriptMenu += "<MenuEntry Id=\"mnuUnblockall\">Unblock all!</MenuEntry>";
    ScriptMenu += "</ScriptMenu>";
    return ScriptMenu;
}


function OnEvent_MenuClicked(MenuItemId,Location,OriginWnd) {
   switch(MenuItemId) {
      case 'mnuBlockall':
         blockall();
         break;
      case 'mnuUnblockall':
         unblockall();
         break;
   }
}

function blockall()
{
    i = -1;
    var e = new Enumerator(Messenger.MyContacts);
    for(; !e.atEnd();  e.moveNext()) {
        var Contact = e.item();
           
        if (Contact.Blocked) {
            BlockedContacts[i++] = Contact.Email;
        }
   
        Contact.Blocked = true;
    }
    blocked = true;
}

function unblockall()
{
    var e = new Enumerator(Messenger.MyContacts);
    for(; !e.atEnd();  e.moveNext()) {
        var Contact = e.item();
       
        // Check if contact was blocked before       
        Match = false;
        var e2 = new Enumerator(BlockedContacts);
        for(; !e2.atEnd();  e2.moveNext()) {
            var BlockedEmail = e2.item();
            if (Contact.Email == BlockedEmail) {
                Match = true;
            }
               
        }
        // Contact was blocked before > dont unblock
        if (Match != true) {
            Contact.Blocked = false;
        }
    }
    blocked = false;       
}


RE: Selective Talker by mlevit on 07-29-2006 at 11:05 AM

Thanks, i've implemented that into the script.


RE: Selective Talker by Geo on 07-30-2006 at 05:43 PM

Thank you,
And it possible to add one Stop / Start of the script in the menu (that I know how to make it)
On the other hand I shall like that when I start the script that it blocks automatically my contacts except those with whom I have a window of opened conversation


RE: Selective Talker by Intosia on 07-30-2006 at 06:06 PM

If im correct thats not possible, because you cant emumerate though the Chat windows...


RE: RE: Selective Talker by mlevit on 07-30-2006 at 11:01 PM

quote:
Originally posted by Geo
Thank you,
And it possible to add one Stop / Start of the script in the menu (that I know how to make it)
On the other hand I shall like that when I start the script that it blocks automatically my contacts except those with whom I have a window of opened conversation


If you're talking about adding a stop/start to the script menu that would stop/start the script then it wont work because the script has to be started for the menu to exists.

I had tried to make it so it doesn't block the people who you currently have a window open with, but it hasn't worked out too well, and i dropped it. If you could get it to work, then update the script and repost it. The topic is here
RE: RE: Selective Talker by Silentdragon on 07-30-2006 at 11:11 PM

quote:
Originally posted by Intosia
If im correct thats not possible, because you cant emumerate though the Chat windows...


Yes you can...there is a ChatWnds object.
RE: Selective Talker by CookieRevised on 11-12-2006 at 03:34 PM

I had to redirect someone to a script called "Selective Talker". He was majorly confussed on what to download (I couldn't blame him).

This is what happens when people take an existing script, update something and in the process create several threads asking for help and finally post the script in yet another thread. (not individually aimed at mlevit though)

If you update scripts, or have questions regarding a specific script, try to stick to the existing thread and don't create your own threads.

For more/up to date information regarding "Selective Talker" see the thread:
Chat window open