THE NEW FIXED SOURCE FOR PALTALK 8.1 CHAT SEND

You can talk about VB programming here

THE NEW FIXED SOURCE FOR PALTALK 8.1 CHAT SEND

Postby cwebz » Sun Jul 17, 2005 6:15 am


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

Code: Select all
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
cwebz
imFiles Newbie
imFiles Newbie
 
Posts: 16
Joined: Mon May 16, 2005 8:54 pm

Re: THE NEW FIXED SOURCE FOR PALTALK 8.1 CHAT SEND

Postby Guest » Sun Jul 17, 2005 3:04 pm

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

Code: Select all
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.......
Code: Select all
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
Guest
 

Postby Departure » Sun Jul 17, 2005 11:19 pm

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
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby cwebz » Mon Jul 18, 2005 2:11 am

I never did try that I should some time thanks for the idea ..
cwebz
imFiles Newbie
imFiles Newbie
 
Posts: 16
Joined: Mon May 16, 2005 8:54 pm

Postby NVYE » Mon Jul 18, 2005 8:45 am

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.
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 234
Joined: Fri Jun 10, 2005 11:29 pm

Postby Departure » Mon Jul 18, 2005 8:52 am

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)
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby cwebz » Wed Jul 20, 2005 8:03 pm

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
cwebz
imFiles Newbie
imFiles Newbie
 
Posts: 16
Joined: Mon May 16, 2005 8:54 pm

Postby Departure » Sat Jul 23, 2005 8:54 am

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
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby cwebz » Wed Aug 31, 2005 10:58 pm

I duno I wish I new ..
cwebz
imFiles Newbie
imFiles Newbie
 
Posts: 16
Joined: Mon May 16, 2005 8:54 pm

Postby Guest » Wed Aug 31, 2005 11:45 pm

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

Code: Select all
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
Code: Select all
Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)


to send the text to the room :D
Guest
 

Postby Departure » Thu Sep 01, 2005 8:26 am

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.
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby Guest » Thu Sep 01, 2005 6:00 pm

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...
Code: Select all
Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
Guest
 


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests