RyanOlson Posted June 3, 2008 Share Posted June 3, 2008 I'm writing a script for my company and one of the functions is to open the error reporting window in system properties and make sure one the options is checked. The issue is I can not find the right command to check if button one is checked or if button to is checked so i can write an if then to tell it if button one is check alt o to ok out. I would write a macro to do it but the problem is we deal with so many varied screen sizes that this would be a much larger issue then just saying to check for button one or button 2 in error reporting window. Link to comment Share on other sites More sharing options...
Airwolf Posted June 3, 2008 Share Posted June 3, 2008 (edited) I'm writing a script for my company and one of the functions is to open the error reporting window in system properties and make sure one the options is checked. The issue is I can not find the right command to check if button one is checked or if button to is checked so i can write an if then to tell it if button one is check alt o to ok out. I would write a macro to do it but the problem is we deal with so many varied screen sizes that this would be a much larger issue then just saying to check for button one or button 2 in error reporting window.You kept referring to buttons, but I believe you meant checkboxes. If so, you need to define your checkboxes as variables, and then use GuiCtrlRead to find out if they are checked or not: ;Create Checkbox1 $checkbox1 = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) ;Find out if Checkbox is checked If GuiCtrlRead($checkbox1) = $GUI_CHECKED Then MsgBox(0,"","Checkbox 1 is checked!") EndIf Edited June 3, 2008 by Airwolf123 Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
RyanOlson Posted June 3, 2008 Author Share Posted June 3, 2008 You kept referring to buttons, but I believe you meant checkboxes. If so, you need to define your checkboxes as variables, and then use GuiCtrlRead to find out if they are checked or not: ;Create Checkbox1 $checkbox1 = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) ;Find out if Checkbox is checked If GuiCtrlRead($checkbox1) = $GUI_CHECKED Then MsgBox(0,"","Checkbox 1 is checked!") EndIf No this is in the sysdm.cpl control panel and they show as buttons in the autoit window info as button one and button to I just need to knwo how to have auto it if possible check and see if button 1 is check or if button to is checked so I can tell it then if button one is checked go to ok if button 2 is check change to button one and then hit ok. Link to comment Share on other sites More sharing options...
RyanOlson Posted June 6, 2008 Author Share Posted June 6, 2008 Can anyone help on this issue for me it is checking on a checked box in the sysdm.cpl in widows. 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