Shoutbox

Retrieve Text of MSN window - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Help (/forumdisplay.php?fid=12)
+----- Thread: Retrieve Text of MSN window (/showthread.php?tid=38309)

Retrieve Text of MSN window by Zick on 02-12-2005 at 12:12 PM

Hello world

I'm currently coding an application in vb6 and I've a problem. In fact I would retrieve the content of a MSN window.

By example : To my contact "Marie" The conversation is that :

Marie said :
Hello
Zick Said :
How are you ?

And when I click on a button of my application, there's, by example, a MSGBOX that said :

Marie said :
Hello
Zick Said :
How are you ?

Is someone know how to do ?


RE: Retrieve Text of MSN window by Plik on 02-12-2005 at 12:16 PM

Using the messenger api you can use the IMessengerConvosationWnd interface of a convosation window do get its contents.

code:
oConversationwindow.history
oCovosation window is the IMessengerConvosationWnd interface of the window you want to get the history of
RE: Retrieve Text of MSN window by Zick on 02-12-2005 at 12:21 PM

And how said to the program of which window the text must be retrieved ?

Can you give me the code plz ?


RE: Retrieve Text of MSN window by Plik on 02-12-2005 at 12:31 PM

Ok this example will put the history in a text box.

code:
Private oMessenger As MessengerAPI.Messenger

Private Sub Form_Load()
Dim oConvo As MessengerAPI.IMessengerConversationWnd
Set oMessenger = New MessengerAPI.Messenger
Set oConvo = oMessenger.InstantMessage("contact@hotmail.com") 'Makes a new im window is one isnt open
Text1.Text = oConvo.History
End Sub

And you will need to add a referance to the messenger api bye checking "Messenger API Type libary"
[Image: attachment.php?pid=379758]
RE: Retrieve Text of MSN window by Zick on 02-12-2005 at 12:45 PM

Now I've another question. Do you know If it exists an Event who send command when the text of a conversation changed ? By example, there is this conversation :

Marie said :
Hello
Zick Said :
How are you ?

And when Marie answer, Yes and You ? My programm retrieves "Yes and you ?".

Do you understand ?


RE: Retrieve Text of MSN window by RaceProUK on 02-12-2005 at 02:04 PM

There isn't an event like that. However, if you can create threads in VB6, you can have a loop in a separate thread that monitors the history.


RE: Retrieve Text of MSN window by Zick on 02-12-2005 at 03:04 PM

oki, thx