get banner room to text box

This topic contains 8 replies, has 3 voices, and was last updated by  autopilot 6 years, 10 months ago.

  • Author
    Posts
    1 Star2 Stars3 Stars4 Stars5 Stars Rate it First!
  • #15124
    Member
    Posts: 62

    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

    #37663
    Member
    Posts: 62

    i know that i am asking too much , but u guys are very helpful so can somebody help me
    I need get it to textbox and change it
    🙄

    #37662
    Administrator
    Posts: 419

    @light 2012 wrote:

    I need get it to textbox and change it

    If your wanting to change it, you should get the text from the admin console.

    #37659
    Member
    Posts: 62

    thanks, string
    No no i need how to get any word or text in pal room to textbox Such as banner text

    #37665
    Administrator
    Posts: 432

    the control for the room header is a RichEdit20W so you get its content the same as the room incoming chat.

    #37660
    Member
    Posts: 62

    thanks autopilot
    But how? please
    What is the next step?

    #37661
    Administrator
    Posts: 432

    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.

    #37658
    Member
    Posts: 62

    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

     

    #37664
    Administrator
    Posts: 432

    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.

You must be logged in to reply to this topic.