DoctorX Posted December 10, 2005 Share Posted December 10, 2005 I want to do this... If ControlGetFocus ($title, $text) <> $control Then ControlFocus ($title, $text, $control) EndIf ControlClick ($title, $text, $control) but the problem is ControlGetFocus() returns the ClassNameNN of a control, whereas my input variable ($control) is always a ControlID. Is there any way to get ControlGetFocus() to return the ControlID instead, or to translate the ClassNameNN --> ControlID? -DRX Link to comment Share on other sites More sharing options...
DoctorX Posted December 10, 2005 Author Share Posted December 10, 2005 It's a message box in the case I'm testing. $ctrl_hwnd[0] seems to be returning as a valid handle, but $hwnd[0] keeps coming back as 0x00000000, no matter what button has focus. I'm using $GUIHANDLE = WinGetHandle ($title, $text) to get the window handle, is that not the right way to do it? -DRX Link to comment Share on other sites More sharing options...
DoctorX Posted December 10, 2005 Author Share Posted December 10, 2005 That did it. Thanks Larry. -DRX Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now