quote:
Originally posted by Jesus
I made a script like this a while ago.
It displays a toast when someone is typing to you and you don't have a conversation window open with that contact.
If you click the toast it will (ofcourse) open a convo with the contact.
though some notes:
1) The script has problems when you use polygamy. When a user has two messengers open this can easly be checked upon with:
code:
var Email = arrdata[1]; // index 12 should give the same email
if (Email !== Messenger.MyEmail) {
... do your stuff
}
2) You assume
nick is always in the contactlist. This might not be so in a multi-contact conversation. So additional checking is required there too. Or don't grab the nickname from
Messenger.MyContacts.GetContact(Email).Name but grab it from the protocol message directly (
decodeURI(arrdata[2])).
3) the global array
found isn't needed. The
found variable can be a local boolean.
4) Although not so crucial in this script, you should be carefull in using timers like that. The timer will still be running when it was started right before the user signs out (and another one signs in). This makes that your array will be used for other users also and in some scripts (this one too, in a specific situation) this will lead to errors or even manipulation of the contactlist of the wrong user.
5) in
ScriptInfo.xml: the ocx is a ActiveX DLL, this should be listed in <OleFiles>, not <DotNetFiles>.
-------------------------
This is my version of the script, made from scratch but with your idea: