How do i get chat text from aol5?
Could someone help me get text from a textbox of another app using the win32 api. I want to get text from the chat room of aol 5.0. on win2k. Here is the code i would typically use...
Function GetText2(hwnd As Long) As String
Dim Buffer As String
Dim BufferLen As Long
BufferLen = SendMessage(hwnd, WM_GETTEXTLENGTH, 0&, 0&)
Buffer = String(BufferLen&, " ")
Call SendMessageByString(hwnd, WM_GETTEXT, BufferLen& + 1, Buffer)
GetText2 = Buffer
End Function
Normally this works fine. With aol 5.0 it doesnt seem to work and i dont know why. The bufferLen in the function above will return the right length of the text in the chatbox however SendMessageByString(hwnd, WM_GETTEXT, BufferLen& + 1, Buffer) does not return the text. What gives? Do you know of an alternate way of doin the same thing? Thanks in advance.
Best Regards
Jason Negrete