Jump to content

Can't get state of radio button


Recommended Posts

Hello everyone.

I have a dialog in an application I'm doing some automation testing for that has radio buttons for which I need to state of each.  They're all returning "0".  Here's my code right now:

$state01 = ControlCommand("User Defined Accounts", "", "[NAME:radioButton_Output_Items]", "IsChecked", "")
MsgBox(0, "", $state01)

I've also tried _GuiCtrlButton_GetCheck.  Nothing works.  "0" is always returned.  Any ideas?

Thank you.

Link to comment
Share on other sites

  • Moderators

Can you show a screenshot of the window, as well as what the Window Info tool shows you regarding the radio buttons specifically?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Looks like the control you're getting might be a collection of controls

"[NAME:radioButton_Output_Items]"

Try

$state01 = ControlCommand("User Defined Accounts", "", "[TEXT:Items]", "IsChecked", "")

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

Could just be that this .net window is not going to play ball, and you may have to use UIAutomation UDF in example scripts.

Have you tried using the ID directly?

$state01 = ControlCommand("User Defined Accounts", "", 329246, "IsChecked", "")

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

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...