Jump to content

Recommended Posts

Posted

bah...

i made a checkbox. When I click it, and try to access weather its checked or not it wont work.

if ( GUICtrlGetState( $available ) = $GUI_CHECKED ) then

msgbox(0, "We are checked", "We are checked")

$selling[GUICtrlRead( $currentslot ) - 1] = 2

Else

msgbox(0, "We are not checked", "We are not checked")

$selling[GUICtrlRead( $currentslot ) - 1] = 1

EndIf

Basically when I click the button this is in, no matter if it was checked or not its return not checked.

WTF is wrong!?!?!?!?!!

driving me nuts.

Posted (edited)

Read state or data of a control.

GUICtrlRead ( controlID )

You're using GuiCtrlRead for $currentslot and you've to use the same for the checkbox($available).

Edited by tonedeaf
Posted

per help

For Checkbox, Radio control several states can be returned as $GUI_FOCUS and $GUI_CHECKED,. So use BitAnd(GUICtrlRead($Item),$GUI_CHECKED) to test if the control is checked.

8)

NEWHeader1.png

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
  • Recently Browsing   0 members

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