Skip to content
Home > Programming > how to find send a file window?

how to find send a file window?

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #187798
    Johnny5
    Member

    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.

    #187815
    autopilot
    Member

    first 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 6

    VB 2005 detect pal version
    and
    VB 2005 find subform wHnd

    good luck

    autopilot

    #187814
    Johnny5
    Member

    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.

    #187813
    Chike
    Member

    Try Winspector spy

    #187812
    Departure
    Member

    Find the window by its title and not by its handel #3030 or something like that is a very common window handel

    #187811
    autopilot
    Member

    @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 Integer

    if 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

    #187810
    autopilot
    Member

    I 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

    #187809
    Johnny5
    Member

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

    #187808
    Johnny5
    Member

    autopilot: 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. 🙂

    #187807
    Johnny5
    Member

    Public Function SendFile2(ByVal strFPath As String) As Boolean
    On Error GoTo ERRX

    Dim 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 = True

    Exit Function
    ERRX:

    End Function



    the above code should works, with condition have the correct nick highlighted. 🙂 thx to autopilot you are great !
    #187806
    autopilot
    Member

    well… 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

    #187805
    method
    Member

    Autopilot 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 textbox
    #187804
    String
    Member

    Find it’s index.
    How do you find its index?

    #187803
    method
    Member

    string 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 ?

    #187802
    autopilot
    Member

    i think this is the link string was trying to give you

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