A real fix can't be given because it is not clear what you want to try to achieve. But we could explain why that script does what it does though...
ChatWndSendMessage() is triggered when
you send something to a conversation.
ChatWndReceiveMessage() is triggered when
something is recieved in a conversation. This includes your own messages since they are recieved too, otherwise you wouldn't see them....
If you include the
Origin parameter in the output, you'll see that
Origin points to the screen name of the person who send the message, in this case
you, not your contact.
But instead of using the
Origin parameter to show who said the message you grab the first person's email in a conversation which is usually your contact.
So, that red line shows your contact's email while he didn't even said anything, together with your message.
Anyways, add the
Origin parameter to the output and things will become more clear of what you did wrong. Also, for debugging stuff like this it is a good idea to also output the function name which is responsible for what line....
In that way, you would have had an ouput something like this:
quote:
17:19:25 - ChatWndSendMessage - ("I am undies") underground99@*******: Hi
17:19:25 - ChatWndReceiveMessage - ("I am undies") doretta82@*******: Hi
17:19:25 - ChatWndReceiveMessage - ("Doretta is here") doretta82@*******: Ollà!
which will probably make things a lot more clear of what happened....
all explained in the Official Scripting Documentation.
PS: if this is just a kind of 'logging' script, then loose the ChatWndSendMessage() function. You don't need it since ChatWndReceiveMessage() will be triggered for anything you send too.
PS: why do you hide your own email while you show your contact's email? You obviously don't want people to know your Windows Live Id to avoid spam, so respect your contact too and don't show his in public forums...