Nice idea, but I would hate it when people use such a script against me
Anyways, some quick comments to improve/fix the script:
-Before using the SendMessage() function, _always_ check that you actually can send something. This is very much stressed upon in the scripting documentation. Especially if you use it in a delayed function like a timer event.
-Cancel all timers when the user signs out!!!!!!!!!!
(...for making it user specific (currently the script is not), and also to avoid a big list of (internal) errors when you do sign out or are signed out, and to avoid that another user is nudging people out of the blue.
-
code:
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
var NoContacts = 0;
for(var e = new Enumerator(Contacts); !e.atEnd(); e.moveNext()) { // why do people always put the enumeration declaration outside the For function, such a waste of space
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
NoContacts = NoContacts + 1;
}
why not simply
ChatWnd.Contacts.Count ?
-
code:
if (Origin != Messenger.MyName) {
Debug.Trace("Message Received");
var Contacts = ChatWnd.Contacts;
for(var e = new Enumerator(Contacts); !e.atEnd(); e.moveNext()) {
var Contact = e.item();
Debug.Trace(" " + Contact.Email);
}
MsgPlus.CancelTimer(Contact.Email);
Debug.Trace("Timer Cancelled");
}
You will cancel the timer from somebody else here...
Contact A has a personal convo with you.
Contact A is also in a group chat with you, together with contact B.
You say something in the personal chat to contact A, timer A starts.
Contact B says something in the group chat, timer of A cancels...
(goes against what your script is meant to do I think)
/me will wave the block wand when someone uses this script against me
EDIT:
quote:
Originally posted by saralk
The truth is, I just wanted a T-shirt
lol