Loading ...
Sorry, an error occurred while loading the content.

Request for a win32 api FindWindowEx

Expand Messages
  • ykozlo
    Hello, I was looking a way to select the textbox and the button of the application I would like to drive.
    Message 1 of 1 , Sep 11, 2004
    • 0 Attachment
      Hello,

      I was looking a way to select the textbox and the button of the
      application I would like to drive.
      http://msdn.microsoft.com/library/default.asp?url=/library/en-
      us/winui/winui/windowsuserinterface/windowing/windows/windowreference/
      windowfunctions/findwindow.asp

      The convenient way to find a child is the win32 api FindWindowEx.
      A google search give me the convenient vb code:

      Dim myapp As Long, textbox As Long
      myapp = FindWindow("main window class name", vbNullString)
      textbox = FindWindowEx(myapp, 0&, "edit", vbNullString)
      Call SendMessageByString(textbox, WM_SETTEXT, 0&, "xxxxxxxxxxxxxx")
      button = FindWindowEx(myapp , 0&, "button", vbNullString)
      Call SendMessageLong(button, WM_KEYDOWN, VK_SPACE, 0&)
      Call SendMessageLong(button, WM_KEYUP, VK_SPACE, 0&)

      If find the class "edit" and "button" with the Spy++ Finder
      This api could be helpfull, it run even if the screen is locked.
      I would be very happy if you can implement them in the next release.
      (I'm new to perl and Xs is for me a dark mystery)

      Best Regards.
    Your message has been successfully submitted and would be delivered to recipients shortly.