Sign in to follow this  
Followers 0
DoctorX

ControlID, ClassNameNN

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

That did it.

Thanks Larry.


-DRX

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0