Hello, zombyw00f:
Here is the C++ code that extracts the text from the AIM Chat
Window, if there is a problem or it doesn't fit your needs, please,
don't hesitate to request for a clarification, I will keep working on
it until you get the desired results:
HWND handle;
HWND child1;
//This is the buffer used to the text
//Customize it to your needs
char buffer[2000];
//Tries to find the Chat Window
handle=FindWindow("AIM_ChatWnd",NULL);
if (handle)
{
//Tries to find the Chat Log window, which is the first child
child1=GetWindow(handle,GW_CHILD);
if (child1)
{
//Gets the text
SendMessage(child1, WM_GETTEXT, 2000, (LPARAM)buffer);
//Shows it
//The returned text is HTML
MessageBox(0,buffer,"Text",0);
}
}
Be aware of the word wrapping when copying/pasting this code.
Regards. |
Clarification of Answer by
joseleon-ga
on
14 Oct 2003 14:19 PDT
Hello, zmobyw00f:
Regarding to know the chat window, that depends on the
implementation of your software, I don't know how do you plan to do
it, but you can distinguish between windows by the caption and modify
this line of code:
handle=FindWindow("AIM_ChatWnd",NULL);
And change NULL to the caption of the Chat window you want to get the
text.
And regarding the VB code, I'm sorry, I'm not proficient in VB, I can
try to adapt it, but you will need to wait a bit, it's OK for you?.
Keep on requesting clarifications until you get satisfactory results,
I'm here to help you.
Regards.
|