- This topic has 7 replies, 3 voices, and was last updated 15 years ago by String.
-
AuthorPosts
-
April 1, 2009 at 10:22 am #187396methodMember
Hi all . I wonder how i can send a click to paltallk login page so it opens the make name window. could any one show me how this can be done? Thanks
April 1, 2009 at 7:52 pm #187403StringMemberHere is some simple code to open the registration page. But that window is only open when you first load pal.Dim lngWin As Long
Dim lngStatic As Long lngWin = FindWindow("#32770", "Welcome to PaltalkScene") lngStatic = FindWindowEx(lngWin, 0&, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic , "static", vbNullString) Call SendMessageLong(lngStatic , WM_LBUTTONDOWN, 0&, 0&) Call SendMessageLong(lngStatic , WM_LBUTTONUP, 0&, 0&)
I didn’t thoroughly test this code, but it should work.
April 1, 2009 at 11:37 pm #187402methodMemberThanks string for your help. I loaded paltalk and pressed the button nothing happend!! No error and the registeration window didn’t open. All i want this link cliced “New user/Get a Nickname” so the registeration window pops up! Hope you help me fix this code.Thanks
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName 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) Private 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 Private Sub Command1_Click() Dim lngWin As Long Dim lngStatic As Long lngWin = FindWindow("#32770", "Welcome to PaltalkScene") lngStatic = FindWindowEx(lngWin, 0&, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) Call SendMessageLong(lngStatic, WM_LBUTTONDOWN, 0&, 0&) Call SendMessageLong(lngStatic, WM_LBUTTONUP, 0&, 0&) End Sub
April 2, 2009 at 2:31 am #187401StringMemberadd this to your declarations
Private Const WM_LBUTTONDOWN = &H201 Private Const WM_LBUTTONUP = &H202
April 2, 2009 at 3:09 am #187400methodMemberThanks for your replyI already tried that but didn’t work!!
April 2, 2009 at 3:25 am #187399StringMemberI don’t know why you are having trouble. I tested the code below and it works fine.
Note that in my first post, I mentioned that the login window is closed after login. If you are logged into pal, it wont work. Open a new project, paste in only the code below.Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName 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) Private 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 Private Const WM_LBUTTONDOWN = &H201 Private Const WM_LBUTTONUP = &H202 Private Sub Command1_Click() Dim lngWin As Long Dim lngStatic As Long lngWin = FindWindow("#32770", "Welcome to PaltalkScene") lngStatic = FindWindowEx(lngWin, 0&, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) lngStatic = FindWindowEx(lngWin, lngStatic, "static", vbNullString) Call SendMessageLong(lngStatic, WM_LBUTTONDOWN, 0&, 0&) Call SendMessageLong(lngStatic, WM_LBUTTONUP, 0&, 0&) End Sub
April 2, 2009 at 5:47 am #187398DepartureMemberWhat version of paltalk are you using? this might have something to do with it as the static control might be in a diffrent order
April 2, 2009 at 6:07 am #187397methodMemberThanks string it worked well .
-
AuthorPosts
Related
- You must be logged in to reply to this topic.