WestCBear Posted March 1, 2016 Share Posted March 1, 2016 Hi all, Once again, I need some help. I'm trying to determine if a checkbox is selected (in a program that is not created by me or in AutoIT.) Since it's not an AutoIT program, I can't use GUICtrlRead. So I used ControlCommand instead. However, while the commands "Check" or "Uncheck" work, the "IsChecked" command produces nothing. Am I missing something? The program is a simple window with one button. When the button is pressed, my program reads from another program that has 10 radio button options. It writes to the console the radio button text and 1 or 0 depending on if the radio button is checked or not. The text is displayed, but the IsChecked command only returns 0s. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 514, 264, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 72, 56, 361, 129) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 For $x = 1 to 10 ConsoleWrite(ControlGetText("Windows Program Name","","[CLASS:TRzGroupButton; INSTANCE:" & $x & "]")& @CRLF) ConsoleWrite(ControlCommand("Windows Program Name","","[CLASS:TRzGroupButton; INSTANCE:" & $x & "]", "IsChecked", "") & @CRLF) Next Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
AutoBert Posted March 1, 2016 Share Posted March 1, 2016 Try ConsoleWrite(ControlCommand("Windows Program Name","","[CLASS:TRzGroupButton; INSTANCE:" & $x & "]", "IsChecked") & @CRLF) as the option-param is optional and not needed. Link to comment Share on other sites More sharing options...
WestCBear Posted March 1, 2016 Author Share Posted March 1, 2016 Hi AutoBert, Thanks for the prompt reply. I already tried that with the same negative result. Any other ideas? Cheers, WestCBear Link to comment Share on other sites More sharing options...
AutoBert Posted March 2, 2016 Share Posted March 2, 2016 Is the app a free software or has a trial version? If so please post the downloadlink, so others and i can try. 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