ok here is code (i think Matthew Gates gave it to me)
This code works with aim and gets the conversation. i need to make it able to work with icq too (and other messaging apps)
i think to get this to work i need to replace "ate32class" and "wndate32class" (not their varaibles but the values in quotes)Code:Private Declare Function GetForegroundWindow Lib "user32" () As Long Private Declare Function GetWindowTextLength Lib "user32" Alias _ "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _ (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long Private Sub Timer1_Timer() Dim aimimessage As Long, wndateclass As Long, ateclass As Long aimimessage = FindWindow(vbNullString, GetActiveWindowTitle(True)) wndateclass = FindWindowEx(aimimessage, 0&, "wndate32class", vbNullString) 'aim window ateclass = FindWindowEx(wndateclass, 0&, "ate32class", vbNullString) 'aim top textbox Dim TheText As String, TL As Long TL = SendMessageLong(ateclass, WM_GETTEXTLENGTH, 0&, 0& TheText = String(TL + 1, " ") Call SendMessageByString(ateclass, WM_GETTEXT, TL + 1, TheText) 'aim text box TheText = Left(TheText, TL) Text1.Text = TheText End Sub
they are aims classes but how do i replace them with the classes of whichever is open?
one more thing: when i try to get aims class it always comes up with "AIM_imessage" not ever "ate32class" or "wndate32class". what do i need to do to get these different classes.
thanks for looking at this thread and thanks in advance for any responces!


Reply With Quote