nago Posted April 2, 2008 Share Posted April 2, 2008 Hello, probably right in front of my face, but I have a checkbox on a program that I wish to de-select, but only if it's selected. The id of the checkbox is something like Button7 (plus text). If you could just point me to the doc for the appropriate function(s) it'd be appreciated, thanks Link to comment Share on other sites More sharing options...
Shadow14l Posted April 3, 2008 Share Posted April 3, 2008 Hello, probably right in front of my face, but I have a checkbox on a program that I wish to de-select, but only if it's selected.The id of the checkbox is something like Button7 (plus text).If you could just point me to the doc for the appropriate function(s) it'd be appreciated, thanks I would try this function: _GUICtrlTreeView_GetCheckedYou can search it in the program's help file for its parameters and its usage! Link to comment Share on other sites More sharing options...
Swift Posted April 3, 2008 Share Posted April 3, 2008 (edited) I would try this function: _GUICtrlTreeView_GetChecked You can search it in the program's help file for its parameters and its usage!How exactly is a treeView function going to work, when he said nothing about a treeview? Hello, probably right in front of my face, but I have a checkbox on a program that I wish to de-select, but only if it's selected. The id of the checkbox is something like Button7 (plus text). If you could just point me to the doc for the appropriate function(s) it'd be appreciated, thanks Try this: If GUICtrlRead($Button7) = $GUI_CHECKED Then GUICtrlSetState($Button7, $GUI_UNCHECKED) Edited April 3, 2008 by R6V2 Link to comment Share on other sites More sharing options...
nago Posted April 3, 2008 Author Share Posted April 3, 2008 $button7? Would that really work? I mean, I am trying to check the status of a checkbox on an installer window, so wouldn't any "check" function (to see the status of the checkbox) need to know the title of the window we're looking at? and the text of that checkbox? Basically, the autoit window info tool says that the checkbox is Button7, and I need to write something where, if it's checked, uncheck it, but otherwise, leave it alone. Link to comment Share on other sites More sharing options...
covaks Posted April 3, 2008 Share Posted April 3, 2008 (edited) If ControlCommand("Window name here","","Button7","IsChecked","") <> 0 Then ControlCommand("window name here","","Button7","UnCheck","") EndIf Edited April 3, 2008 by covaks Link to comment Share on other sites More sharing options...
covaks Posted April 3, 2008 Share Posted April 3, 2008 Or even, just the UnCheck line. Don't really need to check first,s since unchecking something that's already unchecked won't cause an error. Link to comment Share on other sites More sharing options...
Shadow14l Posted April 3, 2008 Share Posted April 3, 2008 How exactly is a treeView function going to work, when he said nothing about a treeview?Because it doesn't have to have anything to do with a treeview...The function only takes two parameters... a control name and an item name.It then returns if it is open (unchecked) or closed (unchecked).For a checkbox, the checked value is 1, and the unchecked value is 0. (Checked and grayed out is 2)It's the same thing with any kind of tree, except the checkbox doesn't have to be a tree -.-".So quit being a smartass >.> 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