Skip to content

get banner room to text box

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #186825
    light 2012
    Member

    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

    #186833
    light 2012
    Member

    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
    🙄

    #186832
    String
    Member

    @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.

    #186831
    light 2012
    Member

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

    #186830
    autopilot
    Member

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

    #186829
    light 2012
    Member

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

    #186828
    autopilot
    Member

    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.

    #186827
    light 2012
    Member

    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

     

    #186826
    autopilot
    Member

    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.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.