What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Get recipients email & name using ChatWndSendMessage

Get recipients email & name using ChatWndSendMessage
Author: Message:
Bolter99
New Member
*


Posts: 7
Joined: Aug 2006
O.P. Get recipients email & name using ChatWndSendMessage
Im making a conversation logger using AJAX to send it to a url, where its then inserted into a sql database. So far its all working perfectly i just need to figure out how to send the name & email of the contact to the server.

Somthing using the ChtWnd object i presume but i dont know where to start.

Somthing like this, if only it worked :p
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
Debug.Trace(ChatWnd.RecipientsName);
}


Ill try and do it myself and ill post my solution here if i work it out myself.

Any help appreciated!
02-17-2007 03:45 PM
Profile E-Mail PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: Get recipients email & name using ChatWndSendMessage
I think you can use this:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
     var Contacts = ChatWnd.Contacts;
     var e = new Enumerator(Contacts);
          for(; !e.atEnd(); e.moveNext()) {
               var Contact = e.item();
               Debug.Trace(" " + Contact.Email);
               Debug.Trace(" " + Contact.Name);
          }
}
It should get all participants in a conversation.

Edit: Thanks vikke.

This post was edited on 02-17-2007 at 04:00 PM by hmaster.
[Image: sig.png]
02-17-2007 03:50 PM
Profile PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: RE: Get recipients email & name using ChatWndSendMessage
quote:
Originally posted by hmaster
I think you can use this:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
     var Contacts = ChatWnd.Contacts;
     var e = new Enumerator(Contacts);
          for(; !e.atEnd(); e.moveNext()) {
               var Contact = e.item();
               Debug.Trace(" " + Contact.Email);
          }
}
It should get all participants in a conversation.

That displays the email, if you want their nickname instead use:
Contact.Name
and their PSM:
Contact.PersonalMessage

You can find more here:
http://www.mpscripts.net/docs.php
02-17-2007 03:57 PM
Profile E-Mail PM Find Quote Report
Bolter99
New Member
*


Posts: 7
Joined: Aug 2006
O.P. RE: Get recipients email & name using ChatWndSendMessage
I need to show just the one... Or ill get a list on the mysql database or just the words "[object]" wont i?

I can probabbly work the rest out myself though.

Anyways, thanks a lot!!! :D

EDIT: Yup got it working now.

This post was edited on 02-17-2007 at 04:25 PM by Bolter99.
02-17-2007 04:13 PM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: Get recipients email & name using ChatWndSendMessage
If you sent only Contact, it would be [object].
02-17-2007 04:39 PM
Profile E-Mail 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