get banner room to text box

hi,

How to get banner room At the top of the roomtext to textbox using JK’s API SPY
please
i try and get this code

Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, wndgroupheader As Long
Dim richeditw As Long
dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString)
splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
wndgroupheader = FindWindowEx(splitterwindowex, 0&, "wndgroupheader", vbNullString)
richeditw = FindWindowEx(wndgroupheader, 0&, "richedit20w", vbNullString)

What is the next step?

untitled

8 thoughts on “get banner room to text box

  1. can you read the text from the chat room? do you know how to find the controls? rather then beg for spoon feeding, work it out. learn how to do it for yourself and you will be much farther ahead in the long run.

  2. Glad to see you could work it out for yourself. Now you need to do some searching and reading to learn how to find the controls without having to map directly to the control (JK’s API SPY code). Mapping to the control that way will have to be updated with every new version of the pal client.

  3. thank you autopilot
    I registered at this forum to learn from you and benefited


    i get it by this this code 🙂

    Public Function GetLastLineTextChat(ByVal hwnd As Long) As String
    Dim lngCount As Long
    Dim lngLineIndex As Long
    Dim lngLength As Long
    Dim strBuffer As String
    
    'Get Line count
    lngCount = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0)
    strBuffer = SPACE(256)
    'resize buffer
    strBuffer = SPACE(256)
    'get line text
    Call SendMessageStr(hwnd, EM_GETLINE, lngCount - 1, ByVal strBuffer)
    GetLastLineTextChat = strBuffer
    
    End Function
    Public Function GetLastLine()
    On Error Resume Next
    Dim dlggroupchatwindowclass As Long, splitterwindowex As Long, wndgroupheader As Long
    Dim richeditw As Long
    dlggroupchatwindowclass = FindWindow("DlgGroupChat Window Class", Form1.Text7.Text)
    splitterwindowex = FindWindowEx(dlggroupchatwindowclass, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    splitterwindowex = FindWindowEx(splitterwindowex, 0&, "splitterwindowex", vbNullString)
    wndgroupheader = FindWindowEx(splitterwindowex, 0&, "wndgroupheader", vbNullString)
    richeditw = FindWindowEx(wndgroupheader, 0&, "richedit20w", vbNullString)
    Form1.RichTextBox5.Text = GetLastLineTextChat(richeditw)
    
    End Function

     

Leave a Reply

You must Register or Login to comment on get banner room to text box