- This topic has 18 replies, 4 voices, and was last updated 18 years ago by Admin.
-
AuthorPosts
-
February 3, 2005 at 1:49 pm #189732AdminAdministrator
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 SubAnd 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 🙂February 3, 2005 at 9:43 pm #189750AdminAdministratorDim 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 Subi 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 😀
February 3, 2005 at 9:47 pm #189749AdminAdministratorby the way the Paltalk Messenger 7.0.4 build 61 has a button now so i use to replace toolbarwindow 8)
February 4, 2005 at 4:25 am #189748AdminAdministratorShit thas better 🙂
February 5, 2005 at 6:41 pm #189747ice_531Memberdon’t see the point in all of that… 🙄
April 12, 2006 at 2:44 pm #189746methodMembercould any one tell me how i can use the code posted by Guest . what modules i need nad what controles in my form?Thanks
April 12, 2006 at 3:08 pm #189745AdminAdministratorlol 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 😉
April 12, 2006 at 8:23 pm #189744methodMemberit give me error :
compile error :
method or data member not foundPrivate Sub Command1_Click()
Call RoomSend(RichTextBox1.TextRTF)
End Subwhen 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.
April 13, 2006 at 12:57 am #189743AdminAdministratorah 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 😈
April 13, 2006 at 1:06 am #189742methodMember@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 foundApril 13, 2006 at 2:57 am #189741BattleStar-GalacticaMember@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 foundmake 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
April 13, 2006 at 12:33 pm #189740AdminAdministratorAh here the code for ya i clean it up 🙂
April 13, 2006 at 12:43 pm #189739methodMemberMany 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
April 13, 2006 at 12:50 pm #189738AdminAdministratoru want to send text to patalk room, but without sending it just putting it on the send box ❓ I am confuse 😯
April 13, 2006 at 12:53 pm #189737methodMember@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
-
AuthorPosts
Related
- You must be logged in to reply to this topic.