What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help - /commands!

Help - /commands!
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: RE: Help - /commands!
Great, that works fine.  That's that script finished...  :D  Thanks!

Actually, I have another question (sorry to keep on at this).  This script blocks the opening of single conversations, group conversations, or both, opened by other users.
Javascript code:
var Window;
var WindowContacts;
 
var FirstRunSetup = true;
var UserEmail = Messenger.MyEmail;
 
var SingleEnabled = false;
var GroupEnabled = false;
 
var SingleMessage = "";
var GroupMessage = "";
 
function OnEvent_Initialize(MessengerStart)
{
    Debug.Trace("-> Welcome to ChatBlock!")
    Debug.Trace("---> Settings for " + UserEmail + ":")
    Debug.Trace("-----> Single chat block = " + SingleEnabled)
    Debug.Trace("-------> Single chat message = \"" + SingleMessage + "\"")
    Debug.Trace("-----> Group chat block = " + GroupEnabled)
    Debug.Trace("-------> Group chat message = \"" + GroupMessage + "\"")
}
 
function OnEvent_ChatWndCreated(Wnd)
{
    Window = Wnd;
    WindowContacts = Wnd.Contacts;
 
    Debug.Trace("-> Conversation window opened!")  
    Debug.Trace("---> Participants = " + WindowContacts.Count);
       
    if(WindowContacts.Count==1)
    {
        Debug.Trace("-> Single conversation detected!")
        if(SingleEnabled==true)
        {
            Debug.Trace("---> Single blocking is enabled!")
            if(SingleMessage=="")
            {
                Debug.Trace("---> No single chat message setup...")
            }
           
            else
            {
                Window.SendMessage(SingleMessage);
                Debug.Trace("---> Single chat message sent!")
            }
           
            Window.SendMessage("/close");
            MsgPlus.DisplayToast("ChatBlock", "Single conversation blocked.")
            Debug.Trace("-----> Single conversation blocked!")
        }
        else
        {
            Debug.Trace("---> Single blocking is disabled!")
        }
    }
    if(WindowContacts.Count > 1)
    {
        Debug.Trace("-> Group conversation detected!")
        if(GroupEnabled==true)
        {
            Debug.Trace("---> Group blocking is enabled!")
            if(GroupMessage=="")
            {
                Debug.Trace("---> No group chat message setup...")
            }
           
            else
            {
                Window.SendMessage(GroupMessage);
                Debug.Trace("---> Group chat message sent!")
            }
           
            Window.SendMessage("/close");
            MsgPlus.DisplayToast("ChatBlock", "Group conversation blocked.")
            Debug.Trace("-----> Group conversation blocked!")
        }
        else
        {
            Debug.Trace("---> Group blocking is disabled!")
        }
    }
}


You'll see that single and group blocking is currently disabled.  However, the problem with this is that not only does it block windows opened by other users, but it also blocks the current user from opening windows as well!  How can I set it so that if the current user opens a window (there's an email variable called "UserEmail"), the blocker will ignore it?
02-04-2009 05:54 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help - /commands! - by whiz on 02-01-2009 at 12:38 PM
RE: Help - /commands! - by matty on 02-01-2009 at 05:53 PM
RE: Help - /commands! - by whiz on 02-02-2009 at 10:59 AM
RE: Help - /commands! - by Matti on 02-02-2009 at 03:30 PM
RE: Help - /commands! [NEW QUESTION!] - by Jesus on 02-07-2009 at 01:15 PM
RE: Help - /commands! - by whiz on 02-15-2009 at 11:45 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