gigilihooie Posted December 22, 2008 Share Posted December 22, 2008 Is there a way to have a button click two or more click boxes on the GUI? I could not figure it out. Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 22, 2008 Share Posted December 22, 2008 Is there a way to have a button click two or more click boxes on the GUI? I could not figure it out. Do You Mean.. You Have A Button In Your GUI That Clicks 2+ Check-Boxes On The Same GUI? If So Then Here : #Include <GUIConstants.Au3> Opt ('GUIOnEventMode','1') #NoTrayIcon $GUI = GUICreate ('Example','96','43','-1','-1','-1','128') GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit') $Check_Box_1 = GUICtrlCreateCheckBox ('','5','5','15','15') $Check_Box_2 = GUICtrlCreateCheckBox ('','5','24','15','15') $Button = GUICtrlCreateButton ('Select','25','10','65','23') GUICtrlSetOnEvent ($Button, '_Toggle_Select') GUISetState (@SW_SHOW, $GUI) While ('1') Sleep ('150') WEnd Func _Toggle_Select () If BitAnd (GUICtrlRead ($Check_Box_1), $GUI_UNCHECKED) <> '0' And BitAnd (GUICtrlRead ($Check_Box_2), $GUI_UNCHECKED) <> '0' Then GUICtrlSetState ($Check_Box_1, $GUI_CHECKED) GUICtrlSetState ($Check_Box_2, $GUI_CHECKED) GUICtrlSetData ($Button, 'Un-Select') Else GUICtrlSetState ($Check_Box_1, $GUI_UNCHECKED) GUICtrlSetState ($Check_Box_2, $GUI_UNCHECKED) GUICtrlSetData ($Button, 'Select') EndIf EndFunc Func _Exit () Exit EndFunc Hope This Helps ! - John Latest Projects :- New & Improved TCP Chat Link to comment Share on other sites More sharing options...
Andreik Posted December 22, 2008 Share Posted December 22, 2008 Is there a way to have a button click two or more click boxes on the GUI?I could not figure it out.I don't understand. Please be more clearly. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
gigilihooie Posted December 22, 2008 Author Share Posted December 22, 2008 Perfect John2006, thenkyou very much. Link to comment Share on other sites More sharing options...
Andreik Posted December 22, 2008 Share Posted December 22, 2008 Another version for _Toggle_Select() Func _Toggle_Select () If GUICtrlRead($Check_Box_1) = 4 And GUICtrlRead($Check_Box_2) = 4 Then ControlCommand("Example","",$Check_Box_1,"Check","") ControlCommand("Example","",$Check_Box_2,"Check","") Else ControlCommand("Example","",$Check_Box_1,"UnCheck","") ControlCommand("Example","",$Check_Box_2,"UnCheck","") EndIf EndFunc When the words fail... music speaks. Link to comment Share on other sites More sharing options...
z0mgItsJohn Posted December 22, 2008 Share Posted December 22, 2008 Perfect John2006, thenkyou very much. Glad I Could Help ; Latest Projects :- New & Improved TCP Chat 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