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

Setting the focus for a combo entry for input via SendKeys()?

Expand Messages
  • yi020024
    I have the window Id for a combo entry, but I can not make it active for SendKeys () (or even SelComboString ()). I ve tried SetFocus () and SetActiveWindow
    Message 1 of 5 , Dec 14, 2005
    • 0 Attachment
      I have the window Id for a combo entry, but I can not make it active
      for SendKeys () (or even SelComboString ()). I've tried SetFocus ()
      and SetActiveWindow () but they do not set the focus to the desired
      entry.

      Is there a specific GUI command to set this focus to a particular combo
      (or field) entry?

      geo
    • brentje
      I m not sure if there is a command for it, but I ve taken to doing many things strictly with mouse clicks. You can do the same if you ve already got the HWND
      Message 2 of 5 , Dec 19, 2005
      • 0 Attachment
        I'm not sure if there is a command for it, but I've taken to doing
        many things strictly with mouse clicks. You can do the same if you've
        already got the HWND of the combo you want to set focus to. Just find
        out it's Rect values, do some math to find the middle of the combo,
        and then click on that area. That should set focus to the combo if
        it's enabled. This is part of the code I wrote for selecting a value
        in a combobox:

        ($lx, $ty, $rx, $by) = GetWindowRect( $hwnd );

        $x = $lx + (($rx - $lx)/2);
        $y = $ty + (($by - $ty)/2);

        MouseMoveAbsPix($x,$y);
        SendMouse('{LEFTCLICK}');

        A single click will dropdown the box, so you might want to do a double
        click to set it back again.

        --- In perlguitest@yahoogroups.com, "yi020024" <yi020024@y...> wrote:
        >
        > I have the window Id for a combo entry, but I can not make it active
        > for SendKeys () (or even SelComboString ()). I've tried SetFocus ()
        > and SetActiveWindow () but they do not set the focus to the desired
        > entry.
        >
        > Is there a specific GUI command to set this focus to a particular combo
        > (or field) entry?
        >
        > geo
        >
      • Dhanapalan.C
        Hi Friends I want to get the hardware deatils using perl program. Is there any WIN32 Modules for that. please help me any one Thanks Dhana
        Message 3 of 5 , Dec 19, 2005
        • 0 Attachment
          Hi Friends
          I want to get the hardware deatils using perl program. Is there any WIN32 Modules for that. please help me any one
          Thanks
          Dhana


          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com

          [Non-text portions of this message have been removed]
        • Sam Sudhakar
          Use the Win32::OLE and WMI ...to retrieve hardware details Susruth Dhanapalan.C wrote: Hi Friends I want to get the hardware deatils
          Message 4 of 5 , Dec 21, 2005
          • 0 Attachment
            Use the Win32::OLE and WMI ...to retrieve hardware details

            Susruth

            "Dhanapalan.C" <dhana_foru@...> wrote:
            Hi Friends
            I want to get the hardware deatils using perl program. Is there any WIN32 Modules for that. please help me any one
            Thanks
            Dhana


            __________________________________________________
            Do You Yahoo!?
            Tired of spam? Yahoo! Mail has the best spam protection around
            http://mail.yahoo.com

            [Non-text portions of this message have been removed]



            SPONSORED LINKS
            Basic programming language C programming language Computer programming languages The c programming language C programming language List of programming languages

            ---------------------------------
            YAHOO! GROUPS LINKS


            Visit your group "perlguitest" on the web.

            To unsubscribe from this group, send an email to:
            perlguitest-unsubscribe@yahoogroups.com

            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


            ---------------------------------






            Susruth Sudhakaran

            You are not responsible for what happens to you in life but you are definitely responsible for how you respond to it
            -------Some great Man(Not Me)


            __________________________________________________
            Do You Yahoo!?
            Tired of spam? Yahoo! Mail has the best spam protection around
            http://mail.yahoo.com

            [Non-text portions of this message have been removed]
          • santoshkadli
            I could do this by calling the PushChildButton($WindowID, $ControlID ). $ControlID = Control ID is the decimal control ID of that perticular Combo object. YOu
            Message 5 of 5 , Jan 10, 2006
            • 0 Attachment
              I could do this by calling the
              PushChildButton($WindowID, $ControlID ).
              $ControlID = Control ID is the decimal control ID of that perticular
              Combo object. YOu can get it from the WinSpy.
              ~Santosh


              --- In perlguitest@yahoogroups.com, "brentje" <brentje@y...> wrote:
              >
              > I'm not sure if there is a command for it, but I've taken to doing
              > many things strictly with mouse clicks. You can do the same if
              you've
              > already got the HWND of the combo you want to set focus to. Just
              find
              > out it's Rect values, do some math to find the middle of the combo,
              > and then click on that area. That should set focus to the combo if
              > it's enabled. This is part of the code I wrote for selecting a
              value
              > in a combobox:
              >
              > ($lx, $ty, $rx, $by) = GetWindowRect( $hwnd );
              >
              > $x = $lx + (($rx - $lx)/2);
              > $y = $ty + (($by - $ty)/2);
              >
              > MouseMoveAbsPix($x,$y);
              > SendMouse('{LEFTCLICK}');
              >
              > A single click will dropdown the box, so you might want to do a
              double
              > click to set it back again.
              >
              > --- In perlguitest@yahoogroups.com, "yi020024" <yi020024@y...>
              wrote:
              > >
              > > I have the window Id for a combo entry, but I can not make it
              active
              > > for SendKeys () (or even SelComboString ()). I've tried
              SetFocus ()
              > > and SetActiveWindow () but they do not set the focus to the
              desired
              > > entry.
              > >
              > > Is there a specific GUI command to set this focus to a
              particular combo
              > > (or field) entry?
              > >
              > > geo
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.