Jump to content
Sign in to follow this  

Can't read state of Radio Button using ControlCommand "IsChecked"

Recommended Posts


I am unable to read the status of a Radio Button on the application I am trying to control.

NOTE: this is not an AutoIT GUI.

The command string I am using is

$status = ControlCommand ( "MyCustomApp", "", "[CLASSNN:WindowsForms10.BUTTON.app.0.33c0d9d15]", "IsChecked", "" )

$status always returns 0 regardless of the state of the radio button

When I use AutoIT v3 Window Info, Select the Control tab and watch the Style Property I can see that the style toggles between

0x5601000B and


I could not find a function that allowed me to read the 'style' of a command.

Do I have a problem with my Syntax, or should this be entered as a bug / feature request?

Share this post

Link to post
Share on other sites

#include <WinAPI.au3>

Const $GWL_STYLE = -16

$hWnd = ControlGetHandle("MyCustomApp", "", "[CLASSNN:WindowsForms10.BUTTON.app.0.33c0d9d15]")

$style = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE)

MsgBox(4096, "", "0x" & Hex($style, 8))

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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