What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help me with a Basic.. and easy.. script

Pages: (2): « First [ 1 ] 2 » Last »
Help me with a Basic.. and easy.. script
Author: Message:
Joined_
New Member
*


Posts: 6
Joined: Mar 2007
O.P. Help me with a Basic.. and easy.. script
Hi to all!
Congratulations for the beatiful forum and the cool software you created.
I've a little problem creating a script.
This is the first time i create a script..
I want to create a script that Blocks/Unblocks the contact i'm talking with..
i tried to modify some other scripts that i found here to do what i want.. but i didn't have any result...
Help me please!
Bye, Lorenzo
P.S.: Sorry for my English but i'm italian!
03-20-2007 03:39 PM
Profile E-Mail PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
RE: Help me with a Basic.. and easy.. script
you can already block/unblock the contact with the /block and /unblock command, or by using the block/unblock button on the conversation window.

If you want to be able to do it another way, please post the code you have so far so we can help you out.
Man is least himself when he is in his own person. Give him a mask and he will tell you the truth. (Oscar Wilde)
03-20-2007 03:51 PM
Profile PM Find Quote Report
Joined_
New Member
*


Posts: 6
Joined: Mar 2007
O.P. RE: Help me with a Basic.. and easy.. script
Yes but.. i need to block/unblock for many times quickly!
03-20-2007 04:00 PM
Profile E-Mail PM Find Quote Report
Vilkku
Veteran Member
*****

Avatar

Posts: 1411
Reputation: 27
35 / Male / Flag
Joined: Mar 2003
RE: Help me with a Basic.. and easy.. script
Can't you make a quick text with /block and /unblock many times? And if you want to annoy your contacts with sound and toasts, use HopperLive.
[Image: signature.php]
03-20-2007 04:15 PM
Profile E-Mail PM Web Find Quote Report
Joined_
New Member
*


Posts: 6
Joined: Mar 2007
O.P. RE: Help me with a Basic.. and easy.. script
Yes.. but.. what type of text? and how can i load and start that text?
03-20-2007 04:56 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me with a Basic.. and easy.. script
something like this
code:
function OnEvent_ChatWndSendMessage(oChatWnd, nMessage){
    var aContacts = new Array();
    if (nMessage === '/cBlock'){
        for (var e = new Enumerator(oChatWnd.Contacts); !e.atEnd(); e.moveNext()){
            aContacts[aContacts.length] = e.item().Email;
        }
        for (var j=0; j < 5; j++){
            for (var i in aContacts){
                aContacts[i].Blocked = !aContacts[i].Blocked;
            }
        }
    }
}

This will block and unblock them 5 times.

Don't do this its very annoying!

This post was edited on 03-20-2007 at 05:07 PM by matty.
03-20-2007 05:05 PM
Profile E-Mail PM Find Quote Report
Joined_
New Member
*


Posts: 6
Joined: Mar 2007
O.P. RE: Help me with a Basic.. and easy.. script
It tell me that the command is not know!
03-20-2007 05:14 PM
Profile E-Mail PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
RE: Help me with a Basic.. and easy.. script
code:
function OnEvent_ChatWndSendMessage(oChatWnd, nMessage){
        var aContacts = new Array();
        if (nMessage === '/cBlock'){
            for (var e = new Enumerator(oChatWnd.Contacts); !e.atEnd(); e.moveNext()){
                aContacts[aContacts.length] = e.item().Email;
            }
            for (var j=0; j < 5; j++){
                for (var i in aContacts){
                    aContacts[i].Blocked = !aContacts[i].Blocked;
                }
            }
        }
        return "";
    }
should doesn't work.
Don't get angry if everyone blocks you when you use this code, because
quote:
Originally posted by Matty
its very annoying!

This post was edited on 03-20-2007 at 05:42 PM by Jesus.
Man is least himself when he is in his own person. Give him a mask and he will tell you the truth. (Oscar Wilde)
03-20-2007 05:19 PM
Profile PM Find Quote Report
Joined_
New Member
*


Posts: 6
Joined: Mar 2007
O.P. RE: Help me with a Basic.. and easy.. script
When i load it, i can't write any message and it also doesn't work!
03-20-2007 05:25 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me with a Basic.. and easy.. script
code:
function OnEvent_ChatWndSendMessage(oChatWnd, nMessage){
    var aContacts = new Array();
    if (nMessage === '/cBlock'){
        for (var e = new Enumerator(oChatWnd.Contacts); !e.atEnd(); e.moveNext()){
            aContacts[aContacts.length] = e.item();
        }
        for (var j=0; j < 2; j++){
            for (var i in aContacts){
                aContacts[i].Blocked = !aContacts[i].Blocked;
            }
        }
        return '';
    }
}

function OnGetScriptCommands(){
    return '<ScriptCommands><Command><Name>cBlock</Name></Command></ScriptCommands>';
}

Maybe they are already blocked!

This post was edited on 03-20-2007 at 05:53 PM by matty.
03-20-2007 05:40 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