quote:
Originally posted by djdannyp
You could use something like:js code:
function OnEvent_ContactSignin(sEmail) {
if ( sEmail === 'contact@hotmail.com' ) ....
}
Wont work for what he wants to do...
-------------
scripto, there is a whole lot more to it than just what whiz has told you.
Making a decent encryption script is not easy at all and there are a hell of a lot tidbits you need to take into account. Even for experienced programmers it proves to be very difficult to get things right (see some of the existing scripts involving the things you want to do).
Not only are there things like the changed text can't be larger than the recieved text, but there is also no easy way to check if a message came from you or from a contact. Especially considering the differences between Nickname feature, Chat-only names and Screen names of you and your contacts (there are some specific threads on the scripting forums about that).
On top of that, it is even not straitforward to get the email address from the person who sends the text, which is what you need to do if you only want the encryption enabled for a certain contact.
In fact, in certain situations it proves to be extremely hard, if not impossible, to get a true correct answer. eg: considering contacts can come from different networks and thus have actually the same email address in your contact list (eg: Yahoo contacts), and this will only getting more complicated with future versions of Messenger.
Thus, throwing in enabling and disabling features, encryption per contact, etc only makes things a lot more complicated and you'll be in for a very steep learning curve.
Not to mention things like multi-contact conversations, etc. And since you can not change recieved text to text which is longer, it is also quite difficult to get something secure in regards to encryption. Making the whole idea of having an encrypted conversation a bit redundant as it will never be really secure anyways.
So, since you said you're just a beginning scripter I would actually suggest to drop the whole idea and start on something far more easier first.