Jump to content

ControlID, ClassNameNN


DoctorX
 Share

Recommended Posts

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...