What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » coding problem

coding problem
Author: Message:
scripto
New Member
*


Posts: 14
33 / – / Flag
Joined: Jan 2010
O.P. coding problem
am new into msgplus scripts but am learning fast
the first time i experienced with a script i had an idea, more like a project... some already did it over here but i decided to do it by my self, like a challenge for me and to learn more....

it's an encryption/decryption tools

am having a problem and it's the following
i want to decrypt the message b4 sending it but the sender have to see it in he's chat box in clear text but it have to be sent in cipher text...
and vise versa, on the receiver side the msg have to be decrypted and then displayed in the receiver box...
How can i grab the incoming message and manipulate it and then display it ?
and how can i display it manipulate it and then send it?

so what class or functions i need for that

P.S am a beginner... if anyone have some time to help me PM for my e-mail...

This post was edited on 02-20-2010 at 12:35 PM by scripto.
02-20-2010 12:15 PM
Profile E-Mail PM Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
RE: coding problem
If you want to change a message before you send it, you can do this:
js code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
    return "This is the message that will be sent instead.";
}
Both you and the contact will see this message, but this only applies to message you send, not receive from a contact.

To change the appearance of a message from you or a contact, you can use this:
js code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
    return "This is the message that will be displayed instead.";
}
Only you will see this message - the other contact will see the message they sent.  Also, the changed message cannot be any longer than the original (otherwise, it'll be truncated).

To make an encrypter, you would need to encrypt the message in the SendMessage function, and then decrypt it in the ReceiveMessage function.  When you send a message, the other contact would receive the encrypted message, and (assuming they have the script installed on their computer) it would be decrypted in the conversation.  You would also see the decrypted message as it would be changed back as soon as it is sent.

This post was edited on 02-20-2010 at 01:00 PM by whiz.
02-20-2010 12:57 PM
Profile E-Mail PM Find Quote Report
billyy
Full Member
***

Avatar

Posts: 103
Reputation: 1
37 / Male / Flag
Joined: Feb 2010
Status: Away
RE: coding problem
Oh wow thats sweet i was wondering about that O_o
Ty Whiz!

This post was edited on 02-20-2010 at 01:03 PM by billyy.
I'm new at this, so don't expect me to be usefull any
time soon. But if i behaved you could rep me :P
02-20-2010 01:02 PM
Profile E-Mail PM Find Quote Report
scripto
New Member
*


Posts: 14
33 / – / Flag
Joined: Jan 2010
O.P. RE: coding problem
mm ok one more question... i wanna make applicable on a specified conversation...
assuming i knw that X have the script installed... therefor i want the encryption script to be enabled in his conversation windows only...
how can that be done
02-21-2010 12:31 AM
Profile E-Mail PM Find Quote Report
djdannyp
Elite Member
*****

Avatar
Danny <3 Sarah

Posts: 3546
Reputation: 31
38 / Male / Flag
Joined: Mar 2006
RE: coding problem
You could use something like:

java code:
function OnEvent_ContactSignin(sEmail) {
    if ( sEmail === 'contact@hotmail.com' ) ....
}
[Image: 1ftt0hpk-signature.png]
AutoStatus Script || Facebook Status Script
5429 days, 13 hours, 25 minutes, 31 seconds ago
02-21-2010 12:45 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: coding problem
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.

This post was edited on 08-30-2010 at 10:13 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-21-2010 02:59 AM
Profile PM Find Quote Report
« 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