dinodod Posted March 18, 2007 Posted March 18, 2007 (edited) I haven't seen this posted anywhere and I came across this issue today. I have a page with a list of checkboxes (so far just 4 but it will grow). Now I need to loop thru them and see which ones are checked so i can take action on the checked ones. No big deal if you have a few but I started to make a loop to loop thru $checkbox1 --> $checkbox4 an test if each one was checked or not. The problem i quickly came across was that I can't understand how to create the loop. It's also 2:30 am and I'm fried Many Thanks Snippet ------------------------------- $Checkbox_Report1 = GUICtrlCreateCheckbox("PC Description", 20, 50) $Checkbox_Report2 = GUICtrlCreateCheckbox("BIOS Info", 20, 75) $Checkbox_Report3 = GUICtrlCreateCheckbox("Registry Size", 20, 100) $Checkbox_Report4 = GUICtrlCreateCheckbox("Installed Apps", 20, 125) ===== Case $msg = $Button_MakeReport For $X = 1 to 4 If BitAnd(GUICtrlRead($Checkbox_Report & $x),$GUI_CHECKED) Then msgbox(0,"","checked") EndIf Next Edited March 18, 2007 by dinodod Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007
GEOSoft Posted March 18, 2007 Posted March 18, 2007 (edited) dinodod said: I haven't seen this posted anywhere and I came across this issue today. I have a page with a list of checkboxes (so far just 4 but it will grow). Now I need to loop thru them and see which ones are checked so i can take action on the checked ones. No big deal if you have a few but I started to make a loop to loop thru $checkbox1 --> $checkbox4 an test if each one was checked or not. The problem i quickly came across was that I can't understand how to create the loop. It's also 2:30 am and I'm fried Many Thanks Snippet ------------------------------- $Checkbox_Report1 = GUICtrlCreateCheckbox("PC Description", 20, 50) $Checkbox_Report2 = GUICtrlCreateCheckbox("BIOS Info", 20, 75) $Checkbox_Report3 = GUICtrlCreateCheckbox("Registry Size", 20, 100) $Checkbox_Report4 = GUICtrlCreateCheckbox("Installed Apps", 20, 125) ===== Case $msg = $Button_MakeReport For $X = 1 to 4 If BitAnd(GUICtrlRead($Checkbox_Report & $x),$GUI_CHECKED) Then msgbox(0,"","checked") EndIf Next oÝ÷ Ûú®¢×ºÚ"µÍÜ ÌÍÖH ÌÍÐÚXÚØÞÔÜHÈ ÌÍÐÚXÚØÞÔÜ Y][ ÕRPÜXY ÌÍÖ K ÌÍÑÕRWÐÒPÒÑQ H[ÙÐÞ ][ÝÉ][ÝË ][ÝÐÚXÚÙY ][ÝÊB^oÝ÷ Ù´â§öÈ*.¦V§¢vv)à±ëÞ©ç$n^²Ø^§íz»azV¬µÈ^rFèÆëÓ~ Edited March 18, 2007 by GEOSoft George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
dinodod Posted March 20, 2007 Author Posted March 20, 2007 Woa, now that's pretty sweet! I never would have thought of using the actual checkboxes in the FOR statement. I figured they would either return 1 or 0 if it was checked or not. How did you learn to do a check like that? Thank you a million times! Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007
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