Results 1 to 2 of 2

Thread: interfacing - very very hard!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    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)



    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
    i think to get this to work i need to replace "ate32class" and "wndate32class" (not their varaibles but the values in quotes)

    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!
    ______________

  2. #2
    Guest
    You have to get them manually. Here is a good API/Windows Spy you can use. Just download the list of stuff he provides and click options and change the list to Get window's text. Than you just click the X on top and drag the picture over the window you want to get and it'll give you the code you need. Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width