What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Script Request - Ignore specific contacts

Pages: (2): « First [ 1 ] 2 » Last »
Script Request - Ignore specific contacts
Author: Message:
kb135
New Member
*


Posts: 3
Joined: Aug 2006
O.P. Huh?  Script Request - Ignore specific contacts
Hello

I searched the script base, and the internet too, but coudnt find what i need...
Maybe, anyone can help me here.

I am searching for a script that is able to "ignore" messages from specific contacts. So the messages will not beeing displayed.
If a message arrives from such a contact the script should "discard" the message, and should not show the message window.
And, if i accidently write a message to one of this "ignored" contacts, the script must discard my message to, so the message will not beeing send to this contact.




Sorry for my very poor english ;)
08-24-2006 01:48 PM
Profile E-Mail PM Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
RE: Script Request - Ignore specific contacts
open up a conversation with who you want to ignore and type thing "/block" it will ignore them ;). to unignore them type "/unblock"

is this the answer you were looking for?
[Image: jeansiger5.jpg]
08-24-2006 02:07 PM
Profile PM Find Quote Report
kb135
New Member
*


Posts: 3
Joined: Aug 2006
O.P. RE: Script Request - Ignore specific contacts

i dont want to actually block the contact. the contact shoud see my onlinestatus, an i want to see the contacts onlinestatus. but i dont want to receive messages from it.
sure, i can just close the conversation window. but ist very annoying to constantly get new windows and closing it all by hand...
08-24-2006 02:26 PM
Profile E-Mail PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Script Request - Ignore specific contacts
quote:
Originally posted by Ash_
open up a conversation with who you want to ignore and type thing "/block" it will ignore them
Not what was asked for. I'm guessing what was asked for is similar to SPNG's Ignore feature.

And this would be quite easy as a script. at least for incoming.

Edit: Like below, for instance.

This post was edited on 08-24-2006 at 02:35 PM by RaceProUK.
[Image: spartaafk.png]
08-24-2006 02:28 PM
Profile PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: Script Request - Ignore specific contacts
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 1").Name){
    ChatWnd.SendMessage("/close");
}
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 2").Name){
    ChatWnd.SendMessage("/close");
}
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 3").Name){
    ChatWnd.SendMessage("/close");
}
}
Edit Ignored Contact 1/2/3 to the email of the contacts you want to ignore.

This would close the Chat Window as soon as the message is received and you will not even notice it, unless you have pop-up notifications for Messages.

This post was edited on 08-24-2006 at 02:31 PM by Felu.
08-24-2006 02:30 PM
Profile E-Mail PM Web Find Quote Report
kb135
New Member
*


Posts: 3
Joined: Aug 2006
O.P. RE: RE: Script Request - Ignore specific contacts
quote:
Originally posted by -!Felu!-
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 1").Name){
    ChatWnd.SendMessage("/close");
}
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 2").Name){
    ChatWnd.SendMessage("/close");
}
if (Origin == Messenger.MyContacts.GetContact("Ignogred Contact 3").Name){
    ChatWnd.SendMessage("/close");
}
}
Edit Ignored Contact 1/2/3 to the email of the contacts you want to ignore.

This would close the Chat Window as soon as the message is received and you will not even notice it, unless you have pop-up notifications for Messages.


This is exactly what i am looking for :) thank you
Now i need to know how to block the pop-up messages too ;)
08-24-2006 03:47 PM
Profile E-Mail PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: Script Request - Ignore specific contacts
I didn't think that was what you were after or else I would have posted an even better script for you.

code:
var list = Array();

function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind)
{
    for (i=0; i<list.length;i++)
    {
        if (Origin === Messenger.MyContacts.GetContact(list[i]).Name)
        {
            ChatWnd.SendMessage("/close")
        }
        else
        {
            return Message;
        }
    }
}

function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
    if (Message === "!ignore")
    {
        var ChatWndContacts = ChatWnd.Contacts;
        if(ChatWndContacts.Count == 1)
        {
            var e = new Enumerator(ChatWndContacts);
            var Contact = e.item();
            list[list.length] = Contact.Email
        }
        return "";
        ChatWnd.SendMessage("/close")
    }
    else if (Message === "!unignore")
    {
        var ChatWndContacts = ChatWnd.Contacts;
        if(ChatWndContacts.Count == 1)
        {
            var e = new Enumerator(ChatWndContacts);
            var Contact = e.item();
            for (i=0;i<list.length;i++)
            {
                if(Contact.Name === list[i])
                {
                    list[i] = "";
                }
            }
            return "";
        }
    }
}

I'm sorry I don't know how to stop the pop-ups either.  The commands are "!ignore" and "!unignore".  I hope you like it.

EDIT: Changed it with te advice of Mattike (I missed a ")" :P)

This post was edited on 08-24-2006 at 04:07 PM by markee.
[Image: markee.png]
08-24-2006 03:57 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: RE: Script Request - Ignore specific contacts
WARNING! BUG!
code:
        if (Origin === Messenger.MyContacts.GetContact(list[i].Name)
should be:
code:
        if (Origin === Messenger.MyContacts.GetContact(list[i]).Name)
Your code would fail because:
  • You've placed the .Name inside the GetContact() function.
  • You've forgot the end ) for the if-statement

Note: You will be able to ignore contacts in StuffPlug 3, which will be released soon. It will let them send you messages and you won't notice it, it won't even be saved in the logs! ;) So if you can wait a little bit longer... :P

This post was edited on 08-24-2006 at 04:05 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-24-2006 04:02 PM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Script Request - Ignore specific contacts
If you do stuff like
code:
for (i=0;i<list.length;i++)
with arrays, replace it with
code:
for (i in list)
no need for length checks i increments and what not (This works for objects too to cycle thru all their properties; it will not work for enumerations).


Second, instead of
code:
ChatWnd.SendMessage("/close")
Use the sendmessage api to close the window. This is better because you don't need to send a message to the conversation in that way (for various reasons you wont always be able to send a message to the conversation).

;)

This post was edited on 08-24-2006 at 06:10 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-24-2006 06:06 PM
Profile PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: RE: RE: Script Request - Ignore specific contacts
quote:
Originally posted by Mattike
Note: You will be able to ignore contacts in StuffPlug 3
I wonder where you got that information?^o)
08-24-2006 07:56 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


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