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 |
|
|
Jesus
Scripting Contest Winner
Koffie, my cat ;)
Posts: 623 Reputation: 15
38 / /
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 |
|
|
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 |
|
|
Vilkku
Veteran Member
Posts: 1411 Reputation: 27
36 / /
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.
|
|
03-20-2007 04:15 PM |
|
|
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 |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
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 |
|
|
Jesus
Scripting Contest Winner
Koffie, my cat ;)
Posts: 623 Reputation: 15
38 / /
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 |
|
|
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 |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|