Sign in to follow this  
Followers 0
nago

non-au3 gui checkboxes

7 posts in this topic

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 :)

Share this post


Link to post
Share on other sites



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_GetChecked

You can search it in the program's help file for its parameters and its usage!

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by R6V2

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

If ControlCommand("Window name here","","Button7","IsChecked","") <> 0 Then
    ControlCommand("window name here","","Button7","UnCheck","")
EndIf

Edited by covaks

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

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  
Followers 0