- This topic has 17 replies, 7 voices, and was last updated 13 years ago by autopilot.
-
AuthorPosts
-
August 5, 2007 at 5:26 am #187798Johnny5Member
hello all, I’m trying to make a program to send music songs over paltalk, could anyone help on finding the window for it? any help or suggestion are great !!!
Thanks Advance.
August 5, 2007 at 1:38 pm #187815autopilotMemberfirst you will need to read and understand THIS to learn the basics of integrating a program with paltalk.
Once you understand what is being taught in the above post, then you can start applying what you have learned and use reshack to figure out the command to send to open a Send File dialoge box.
If you understand VB and can follow code, you can use one of the following as a starting point so your program will work with multiple versions of the paltalk client:
VB 6VB 2005 detect pal version
and
VB 2005 find subform wHndgood luck
autopilot
August 6, 2007 at 1:17 am #187814Johnny5Memberhi autopilot, thx for fast reply, i’m able to get the window popup, however using API SPY to find the window is not work, is the another way to find that window? b/c I have to find the window handle to insert text into the filepath textbox. Thanks for your help.
August 6, 2007 at 11:59 am #187813ChikeMemberTry Winspector spy
August 6, 2007 at 12:50 pm #187812DepartureMemberFind the window by its title and not by its handel #3030 or something like that is a very common window handel
August 7, 2007 at 5:17 pm #187811autopilotMember@Johnny5 wrote:
hi autopilot, thx for fast reply, i’m able to get the window popup, however using API SPY to find the window is not work, is the another way to find that window? b/c I have to find the window handle to insert text into the filepath textbox. Thanks for your help.
johnny try using the findwindow api.
Declare Auto Function FindWindow Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Auto Function FindWindowNullClassName Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As Integer, ByVal lpWindowName As String) As Integer
Declare Auto Function FindWindowNullWindowCaption Lib "user32.dll" Alias "FindWindow" (ByVal lpClassName As String, ByVal lpWindowName As Integer) As Integerif you know the window caption, class name or both, then you can get the handle with one of the above api calls.
or… you can get this vb6 project or this vb2005 module and follow the examples to get the subwindow handles.
autopilot
EDIT: I like to use a spy utility that comes with autohotkey
EDIT2: the above code is for vb2005… if you are using vb6, you will have to change integer to long
August 9, 2007 at 2:29 pm #187810autopilotMemberI added the send file functionallity to my sample vb6 send text project. I dont know how or why, but the standard approach would not work so i used sendkeys instead. you may have to play with the sleep times to get it to work on your pc.
autopilot
August 10, 2007 at 10:32 pm #187809Johnny5Memberthx autopilot, you know what, I used ResHack to view the dialog (#116) which is the send file window, in there I found a weirdo class {#######} I guest is the CommonDialog thingy , I’m able to find the window and all the buttons, however it require to browse for the file and open it, It used that instead of the filepath in the text box, I tested open a file then change the text path, send, the received file is what I openned, not the one in textbox. I need to somehow set the OpenFile thingy hihi, this is hard.
Any additional help greatly appreciated.
August 10, 2007 at 11:08 pm #187808Johnny5Memberautopilot: I think I got it, enter the full file path in the openfile dialog then press sendKeys Enter to get out of openfile then press send. 🙂
August 11, 2007 at 2:18 am #187807Johnny5MemberPublic Function SendFile2(ByVal strFPath As String) As Boolean
On Error GoTo ERRXDim window As Long
‘For PT 9.x
window = FindWindow(“dlggroupchat window class”, vbNullString)PostMessage window, WM_COMMAND, 32902, 0
Sleep (1000) ‘wait 1 second to let file send box open
SendKeys “{TAB 2}” ‘Get focus on Browse Button
SendKeys “{ENTER}” ‘Open Browse box
Sleep (500) ‘wait half second to let browse box open
SendKeys strFPath ‘send file name to browse box
SendKeys “{ENTER}” ‘Accept file name entry
Sleep (500) ‘wait half second to let browse box close
SendKeys “{TAB}” ‘Get focus on Send Button
SendKeys “{ENTER}” ‘Send the file
SendFile2 = TrueExit Function
ERRX:End Function
the above code should works, with condition have the correct nick highlighted. 🙂 thx to autopilot you are great !August 12, 2007 at 9:56 pm #187806autopilotMemberwell… knowing that the vb sendkeys function is not supported by vista, i was not real pleased with the solution that I had come up with. so i played with the code until i came up with a solution that did not use the sendkeys function. so not only will it work with vista, but it also executes alot faster then the sendkeys function
autopilot
April 5, 2009 at 11:33 pm #187805methodMemberAutopilot if i got a second edit box in the same exteranl window how i can use your code to send text to that edit box too ?
iHnd = getPalSubForm("#32770", "Open", "Edit", 1) 'find textbox to place file name
iResult = SendMessageByString(iHnd, WM_SETTEXT, 0, Text2.Text) 'send file name to textboxApril 6, 2009 at 1:02 am #187804StringMemberFind it’s index.
How do you find its index?April 6, 2009 at 1:29 am #187803methodMemberstring thanks but i dont see anything about index of edit boxes in this page. I want to send text to description edit box in upload video window but all i dont know how to refrence that edit box. I know how to send text to first edit box but not the second one !!! Could u tell me how to send text to that edit box ?
April 7, 2009 at 7:06 pm #187802autopilotMemberi think this is the link string was trying to give you
-
AuthorPosts
Related
- You must be logged in to reply to this topic.