Warning Posted January 20, 2011 Share Posted January 20, 2011 (edited) Hi I'm trying to make a Windows-Cleaner Script with GUI. Current Source:expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=form1.kxf $Form1_1 = GUICreate("Win-Cleaner", 241, 321, 438, 193, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_DLGFRAME,$WS_POPUP,$WS_GROUP,$WS_CLIPSIBLINGS)) $Label1 = GUICtrlCreateLabel("Válaszd ki hogy milyen programok", 0, 8, 195, 17) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("vannak telepítve a számítógépedre.", 0, 24, 208, 17) GUICtrlSetFont(-1, 9, 800, 0, "MS Sans Serif") $Checkbox1 = GUICtrlCreateCheckbox("Avant Browser", 8, 144, 217, 17) $Checkbox2 = GUICtrlCreateCheckbox("Google Chrome", 8, 120, 137, 17) $Checkbox3 = GUICtrlCreateCheckbox("Mozilla Firefox", 8, 72, 137, 17) $Checkbox4 = GUICtrlCreateCheckbox("Internet Explorer", 8, 48, 169, 17) GUICtrlSetState(-1, $GUI_CHECKED) $Checkbox5 = GUICtrlCreateCheckbox("Opera Browser", 8, 96, 113, 17) $Checkbox6 = GUICtrlCreateCheckbox("MSN Messenger", 8, 168, 113, 17) $Checkbox7 = GUICtrlCreateCheckbox("Spybot Search and Destroy", 8, 216, 153, 17) $Checkbox8 = GUICtrlCreateCheckbox("Punkbuster", 8, 192, 161, 17) $Checkbox9 = GUICtrlCreateCheckbox("Macromedia Flash Player", 8, 240, 145, 17) $Button1 = GUICtrlCreateButton("Kiválaszt", 64, 280, 105, 25, 0) $Button2 = GUICtrlCreateButton("X", 216, 0, 17, 17, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit 0 Case $Button2 exit 0 Case $Button1 Do sg. If Checkbox1 activated Do an other thing If Checkbox2 activated ..... EndSwitch WEndWhile 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit 0 Case $Button2 exit 0 Case $Button1 !!!Do sg. If Checkbox1 activated!!! !!!Do an other thing If Checkbox2 activated!!! ..... EndSwitchWEndIs there any way to let me to that? Because there isn't valuable return value of it. (It return always 5 for me) Edited January 20, 2011 by Warning Link to comment Share on other sites More sharing options...
Xandy Posted January 20, 2011 Share Posted January 20, 2011 (edited) I don't think I understand you, however if you want to read a checkbox value, I did it like this. Case $Button1 $val=GUICtrlRead($Checkbox1) msgbox(0, " ", $val) endswitch when checkbox1 is not checked $val=4 when checkbox1 is checked $val=1 does that help you?¿ Edited January 20, 2011 by songersoft Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Warning Posted January 20, 2011 Author Share Posted January 20, 2011 Hmm, dunno but I found the good command $Check1 = BitAnd(GUICtrlRead($Checkbox1),$GUI_CHECKED) Anyways thanks every trying. 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