Re: Setting the focus for a combo entry for input via SendKeys()?
- 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.
--- In firstname.lastname@example.org, "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
> already got the HWND of the combo you want to set focus to. Just
> 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
> in a combobox:
> ($lx, $ty, $rx, $by) = GetWindowRect( $hwnd );
> $x = $lx + (($rx - $lx)/2);
> $y = $ty + (($by - $ty)/2);
> A single click will dropdown the box, so you might want to do a
> click to set it back again.
> --- In email@example.com, "yi020024" <yi020024@y...>
> > I have the window Id for a combo entry, but I can not make it
> > for SendKeys () (or even SelComboString ()). I've tried
> > and SetActiveWindow () but they do not set the focus to the
> > entry.
> > Is there a specific GUI command to set this focus to a
> > (or field) entry?
> > geo