Skip to content

THE NEW FIXED SOURCE FOR PALTALK 8.1 CHAT SEND

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #189445
    cwebz
    Member

    you want to put this coding in your module .. then you want to use this to send the text PALSEND text1.text or what ever txt box you use ..

    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
    Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
    Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Public Const WM_SETTEXT = &HC
    Public Const WM_LBUTTONDOWN = &H201
    Public Const WM_LBUTTONUP = &H202
    Public Const VK_RETURN = &HD
    Public Const WM_KEYDOWN = &H100
    Public Const WM_KEYUP = &H101
    Sub PALCHATSEND(TEXT As String)
    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atlfe As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long

    Dim Button As Long
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atlfe = FindWindowEx(wtlsplitterwindow, 0&, "atl:00501680", vbNullString)
    atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageByString(richedita, WM_SETTEXT, 0&, TEXT$)

    If richedita = 0 Then

    Exit Sub
    End If

    Do
    DoEvents
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atlfe = FindWindowEx(wtlsplitterwindow, 0&, "atl:00501680", vbNullString)
    atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
    Loop Until richedita <> 0
    End Sub
    #189456
    Admin
    Administrator

    @cwebz wrote:

    you want to put this coding in your module .. then you want to use this to send the text PALSEND text1.text or what ever txt box you use ..

    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
    Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
    Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Public Const WM_SETTEXT = &HC
    Public Const WM_LBUTTONDOWN = &H201
    Public Const WM_LBUTTONUP = &H202
    Public Const VK_RETURN = &HD
    Public Const WM_KEYDOWN = &H100
    Public Const WM_KEYUP = &H101
    Sub PALCHATSEND(TEXT As String)
    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atlfe As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long

    Dim Button As Long
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atlfe = FindWindowEx(wtlsplitterwindow, 0&, "atl:00501680", vbNullString)
    atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageByString(richedita, WM_SETTEXT, 0&, TEXT$)

    If richedita = 0 Then

    Exit Sub
    End If

    Do
    DoEvents
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atlfe = FindWindowEx(wtlsplitterwindow, 0&, "atl:00501680", vbNullString)
    atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
    Loop Until richedita 0
    End Sub

    ❓ Arghhh ok you left out you need a command button aswell not much use for a textbox without a command button =)°

    im trying to figure out why you people put all of this code in a Module anyway i have seen this type of method in a few of the people who program here. To me using a module is just adding on i only place a few of the “Declare Functions” in a module only if needed depends on what im making my anti-ban has all the declare functions in the module 8)

    as for this…….

    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atlfe As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long

    Dim Button As Long
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atlfe = FindWindowEx(wtlsplitterwindow, 0&, "atl:00501680", vbNullString)
    atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageByString(richedita, WM_SETTEXT, 0&, TEXT$)

    If richedita = 0 Then

    Exit Sub
    End If

    i just place it in the Private Sub Command1() End Sub

    #189455
    Departure
    Member

    well syxx thats not true that you need a command button, what about just hitting the enter key after typing your message in the text box…. :OP
    hehehehe i know im just being a smart ass

    Private Sub txtbox_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    “Run Code here”
    End If
    End Sub

    #189454
    cwebz
    Member

    I never did try that I should some time thanks for the idea ..

    #189453
    AhFox
    Member

    Hmm … I don’t see why you guys don’t change this string

    Find:
    “atl:00501680”

    Change:

    vbNullString

    This will work for 8.0 … 8.1 and maybe new version of paltlak …. if they don’t change the structure.

    #189452
    Departure
    Member

    because cwebz has used an API spy to get the code, and its very funny due to the fact PSC had a submission today that got rejected and funny enough it was titled the same as this post. But the author claims in his discription that he had “fixed” the code hehehe there is nothing fix about it, like i said it comes stright from an API spy (maybe Pat or JK API spy)

    #189451
    cwebz
    Member

    true you do have a point I mean it’s harder then hell to actually do it any other way you know urmmm you got a point but hey it works .. I haven’t found any coding yet that did work untill I just figured this out granted I do reak at programming at times

    #189450
    Departure
    Member

    Dont be hard on your self mate, the main leasson is that you have found this out by your self and not copyed other peoples codes. And that in my eyes makes you more of a VB programmer than some of the other people that claim code as there own when it very clear that they have ripped it of someone eles code.

    Anyway what im saying is that you have done well to work this out by self :O)

    P.s why did this code get rejected from PSC?? there is nothing harmful in this code

    #189449
    cwebz
    Member

    I duno I wish I new ..

    #189448
    Admin
    Administrator

    Well old news but i use this just about the same as what you used but i think the way i do it better 😀

    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atl As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long
    Dim Button As Long
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00504680", vbNullString)
    atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageByString(richedita, WM_SETTEXT, 0&, Text$)

    If richedita = 0 Then

    Exit Sub
    End If

    Do
    DoEvents
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00504680", vbNullString)
    atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
    Loop Until richedita 0
    End Sub

    and have this

    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)

    to send the text to the room 😀

    #189447
    Departure
    Member

    hmmm syxxx its okay but….

    you have un-needed code hehehe

    you have this……

    Do
    DoEvents
    mywindowclass = FindWindow(“my window class”, vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, “wtl_splitterwindow”, vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, “wtl_splitterwindow”, vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, “wtl_splitterwindow”, vbNullString)
    atl = FindWindowEx(wtlsplitterwindow, 0&, “atl:00504680”, vbNullString)
    atlaxwin = FindWindowEx(atl, 0&, “atlaxwin71”, vbNullString)
    x = FindWindowEx(atlaxwin, 0&, “#32770”, vbNullString)
    richedita = FindWindowEx(x, 0&, “richedit20a”, vbNullString)
    richedita = FindWindowEx(x, richedita, “richedit20a”, vbNullString)
    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
    Loop Until richedita 0
    End Sub

    when you could have this instead……

    Do
    DoEvents

    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
    Loop Until richedita 0
    End Sub

    your subclassing down to richedita twice, and you only have tobclass down one because you already have richedita = FindWindowEx(x, richedita, “richedit20a” when you set the text.

    #189446
    Admin
    Administrator

    yeah but this is not my code thou 😕

    i was telling him i think the best way thing to use to send the text to the room would be to use this…

    Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.