Jump to content

Checkbox


Recommended Posts

I heard that using BitAND is more reliable for this:

$CBox = GUICtrlCreateCheckbox("My checkbox", 11, 11)
If BitAND(GuiCtrlRead($CBox), $GUI_CHECKED) = $GUI_CHECKED Then
;If GuiCtrlRead($CBox) = $GUI_CHECKED Then
    Msgbox(0,"","$CBox is Checked!")
Else
    Msgbox(0,"","$CBox is Not Checked!")
EndIf

Das Häschen benutzt Radar

Link to comment
Share on other sites

First, Squirrely1 is correct

Secondly...

Generally, there is more that one checkbox or radio to be check and many use an array to create/check these controls, so I use this.... ( from Zedna in Autoit Wrappers )

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

example

If _IsChecked($control_name) then....

8)

Edited by Valuater

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...