Jump to content
Sign in to follow this  
Damastah

Check if box is checked

Recommended Posts

Damastah

I'm auto-installing a program that has options that you can check.

E.G.: Do you want to add a shortcut to your desktop?

and you can check the box.

I want to say, if (box_is_checked) dont check it...

How do i do that?

Share this post


Link to post
Share on other sites
LilNewKid8

if guictrlread($checkbox) = $gui_checked then ;it is checked

Share this post


Link to post
Share on other sites
FreeRider

Hi Damastah,

Use this... BitAnd(GUICtrlRead($Item),$GUI_CHECKED) and see GUICtrlRead function in help file for more details.

Notice that $Item is the CtrlId of the control you want to check.

Bye


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites
Valuater

I find this little Function from Zedna very useful...

If _IsChecked($Checkbox_1) then....

Func _IsChecked($control)
    Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
EndFunc

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites
Nevin

I'd imagine that rather than doing

if box is checked

uncheck box

you could just set the box to "unchecked" from the start. if it was already unchecked..who cares? :)

Share this post


Link to post
Share on other sites
NELyon

I think he means on an external application (A non-Autoit generated GUI)

I'll be back with some code in a minute (Unless someone beats me to it)

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  

×