Skip to content

Call RoomSend

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #189732
    Admin
    Administrator

    Well here what I am using in case u had problems, some people were. 😉


    Public Sub RoomSend(Text As String)
    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atld As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long
    On Error Resume Next
    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atld = FindWindowEx(wtlsplitterwindow, 0&, "atl:004d6640", vbNullString)
    atlaxwin = FindWindowEx(atld, 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)
    atld = FindWindowEx(wtlsplitterwindow, 0&, "atl:004d6640", vbNullString)
    atlaxwin = FindWindowEx(atld, 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 to call it

    Call RoomSend(RichTextBox1.TextRTF)

    This the old method that the paltalk programers use to send meesges to paltalk rooms.
    I just put this cause some people where having problems with Call RoomSend including me, lol 🙂

    #189750
    Admin
    Administrator
    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atld As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim toolbarwindow As Long
    Dim richedita As Long

    mywindowclass = FindWindow("my window class", vbNullString)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atld = FindWindowEx(wtlsplitterwindow, 0&, "atl:004d6640", vbNullString)
    atlaxwin = FindWindowEx(atld, 0&, "atlaxwin71", vbNullString)
    x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
    toolbarwindow = FindWindowEx(x, 0&, "toolbarwindow32", vbNullString)
    Call SendMessageLong(toolbarwindow, WM_LBUTTONDOWN, 0&, 0&)
    Call SendMessageLong(toolbarwindow, WM_LBUTTONUP, 0&, 0&)
    richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
    richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
    Call SendMessageByString(richedita, WM_SETTEXT, 0&, Text1.Text)
    SendKeys "{ENTER}"
    If toolbarwindow = 0 Then
    MsgBox "Error: Cannot find room window dumbass!"
    Exit Sub
    End If
    End Sub

    i use the toolbarwindow to call there is a |> looking thing in the pm’s and chat rooms that i use that to send the text 😀

    #189749
    Admin
    Administrator

    by the way the Paltalk Messenger 7.0.4 build 61 has a button now so i use to replace toolbarwindow 8)

    #189748
    Admin
    Administrator

    Shit thas better 🙂

    #189747
    ice_531
    Member

    don’t see the point in all of that… 🙄

    #189746
    method
    Member

    could any one tell me how i can use the code posted by Guest . what modules i need nad what controles in my form?Thanks

    #189745
    Admin
    Administrator

    lol check the greeter code it has everything, but check this firs u ad a rich textboxt to your form.

    then you add a module by clicking on project then on add module and enter this code, it need some clean up but still it works 🙂

    Option Explicit
    Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
    Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) 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 MoveMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSource As Any, ByVal dwLength As Long)
    Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
    (Destination As Any, Source As Any, ByVal Length As Long)
    Private Const WM_SETTEXT = &HC
    Private Const EM_GETLINECOUNT = &HBA
    Public Const VK_SPACE = &H20
    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
    Public Const WM_CHAR = &H102
    Public Const WM_COMMAND = &H111
    Public Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    Public Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long
    Public Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    Public Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
    Public Declare Function GetMenu Lib "user32" (ByVal hWnd As Long) As Long
    Public Declare Function GetWindow Lib "user32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
    Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
    Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    Public Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hWnd As Long) As Long
    Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Boolean
    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 Const WM_GETTEXT = &HD
    Public Const WM_GETTEXTLENGTH = &HE
    Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) 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 Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Public TREEVIEW_HOOK As Long
    Public Const WH_CALLWNDPROC = &H4
    Sub RoomSend(Text As String)
    Dim mywindowclass As Long
    Dim wtlsplitterwindow As Long
    Dim atld As Long
    Dim atlaxwin As Long
    Dim x As Long
    Dim richedita As Long
    Dim Button As Long
    mywindowclass = FindWindow("my window class", Form1.Text1.Text)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atld = FindWindowEx(wtlsplitterwindow, 0&, "atl:0053d798", vbNullString)
    atlaxwin = FindWindowEx(atld, 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", Form1.Text1.Text)
    wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
    atld = FindWindowEx(wtlsplitterwindow, 0&, "atl:0053d798", vbNullString)
    atlaxwin = FindWindowEx(atld, 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


    then you put a command button on the form and on the command button enter this call to send the text which is in the richtextbox to the paltalk room

    Call RoomSend(RichTextBox1.TextRTF)

    aigh thas it but the greeter or funtext code has that already 😉

    #189744
    method
    Member

    it give me error :

    compile error :
    method or data member not found

    Private Sub Command1_Click()
    Call RoomSend(RichTextBox1.TextRTF)
    End Sub

    when u say richtext file is that a specile type of textbox ? i could not find it and i just use normal textbox with RichTextBox1 name.

    #189743
    Admin
    Administrator

    ah you need to add a rcihtectbox to your form, its kindna like the textbox but cooler, you have to go to project click on components and look there for the richtextbox component 🙂

    umm if you want I can make a quick code for ya, i willeven clean it up lol I know my codes always got extra stuff lol 😈

    #189742
    method
    Member

    @Admin wrote:

    ah you need to add a rcihtectbox to your form, its kindna like the textbox but cooler, you have to go to project click on components and look there for the richtextbox component 🙂

    umm if you want I can make a quick code for ya, i willeven clean it up lol I know my codes always got extra stuff lol 😈

    man that would be so nice since i just want to learn vb.

    Now i get compile error and pointing to :

    mywindowclass = FindWindow(“my window class”, Form1.Text1.Text)

    compile error
    method or or data member not found

    #189741

    @method wrote:

    @Admin wrote:

    ah you need to add a rcihtectbox to your form, its kindna like the textbox but cooler, you have to go to project click on components and look there for the richtextbox component 🙂

    umm if you want I can make a quick code for ya, i willeven clean it up lol I know my codes always got extra stuff lol 😈

    man that would be so nice since i just want to learn vb.

    Now i get compile error and pointing to :

    mywindowclass = FindWindow(“my window class”, Form1.Text1.Text)

    compile error
    method or or data member not found

    make sure you have added a Text1 in your form1 and veryfy if your FindWindow is declared if you declare in a module make sure is public

    #189740
    Admin
    Administrator

    Ah here the code for ya i clean it up 🙂

    #189739
    method
    Member

    Many thanks loco for the source code. Could look at my post :

    and let me know what things needed to be changed in order that it work. My intention was to just send text to paltalk send text with out sending it to room. I just want to learn how this findwindow and send text works. Thanks

    #189738
    Admin
    Administrator

    u want to send text to patalk room, but without sending it just putting it on the send box ❓ I am confuse 😯

    #189737
    method
    Member

    @Admin wrote:

    u want to send text to patalk room, but without sending it just putting it on the send box ❓ I am confuse 😯

    i just want to put the text in send box . I just want to learn the basic that is why i want to learn step by step. So i be glad if u look at my code that was just puting file in notpad and tell me what parts do i need to change so that it put the input text to paltalk send box.Thanks

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