Diana (Cda) Posted February 12, 2008 Share Posted February 12, 2008 I've built the GUI but haven't a clue how to chain selections together. Ideally, as with the one I built (which I stupidly forgot to bring to work today so I could post it, but posting this question anyway), I have just one AU3 file. I found some time ago a multiple choice script that has 3 files to do the deed but I always like to keep scripts in one file. Too easy to lose bits and pieces here and there if we start having more than one file to deal with. I'll try to illustrate what's needed. The main gui would look something like this re the choices with the usu. OK and Cancel buttons: [ ] Choice #1 [ ] Choice #2 [ ] Choice #3 [ ] Choice #4 [ ] Choice #5 [ ] Choice #6 [ ] Choice #7 [ ] Choice #8 So that in an example set of choices, here: [ ] Choice #1 [x] Choice #2 [ ] Choice #3 [ ] Choice #4 [x] Choice #5 [x] Choice #6 [ ] Choice #7 [x] Choice #8Then items 2, 5, 6 and 8 would be executed. So if anyone knows of script that does this, but hopefully that is easy enough for a noob to work with <g>, pls advise. Thanks! Link to comment Share on other sites More sharing options...
jokke Posted February 12, 2008 Share Posted February 12, 2008 (edited) Start with a loop going through your choices, then create a switch (simpler then using "if $blabla = true then" This is just some silly code, but shows how it could be done. Dim $choice[7] $choice[0] = "This" $choice[1] = "This" $choice[2] = "That" $choice[3] = "This" $choice[4] = "This" $choice[5] = "This" $choice[6] = "That" Dim $logic ;On/Off logic 0/1 For $x = 0 to 6 Switch $choice[$x] Case "This" ;On $logic = $logic & "0" Case "That" ;Off $logic = $logic & "1" EndSwitch Next Switch $logic Case "0000000" ConsoleWrite("None selected."&@CRLF) Case "1000000" ConsoleWrite("1 selected."&@CRLF) Case "1100000" ConsoleWrite("1,2 selected."&@CRLF) Case "0010001" ConsoleWrite("3,7 selected"&@CRLF) EndSwitch Edited February 12, 2008 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Diana (Cda) Posted February 13, 2008 Author Share Posted February 13, 2008 (edited) Oh, dear. Of course, the syntax is such that I can't figure out exactly how to incorporate it into the gui script <sigh>. Why did I think it would be easy <g>?? I made sure to search out and bring in my script today. I built it with Koda. Here it is:expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=e:\apps\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080129.tu- checkbox gui.kxf $Form1_1 = GUICreate("Make selection ...", 374, 371, 193, 115) $Label1 = GUICtrlCreateLabel("Make selection:", 18, 13, 336, 24) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Checkbox1 = GUICtrlCreateCheckbox("1", 25, 40, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox1Click") $Checkbox2 = GUICtrlCreateCheckbox("2", 25, 65, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox2Click") $Checkbox3 = GUICtrlCreateCheckbox("3", 25, 89, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox3Click") $Checkbox4 = GUICtrlCreateCheckbox("4", 25, 113, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox4Click") $Checkbox5 = GUICtrlCreateCheckbox("5", 25, 138, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox5Click") $Button1 = GUICtrlCreateButton("OK", 115, 312, 65, 25, 0) ; left, top, width, height GUICtrlSetOnEvent(-1, "Click_OK") $Button2 = GUICtrlCreateButton("Cancel", 200, 312, 65, 25, 0) ; left, top, width, height GUICtrlSetOnEvent(-1, "Click_CANCEL") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Checkbox1Click() EndFunc Func Checkbox2Click() EndFunc Func Checkbox3Click() EndFunc Func Checkbox4Click() EndFunc Func Checkbox5Click() EndFunc Func Click_OK() EndFunc Func Click_CANCEL() Exit ; finished EndFunc I'm not 100% sure where the rest would go; but, one step at a time <g>. Thanks! Edited February 13, 2008 by Diana (Cda) Link to comment Share on other sites More sharing options...
murdock Posted February 13, 2008 Share Posted February 13, 2008 (edited) I know this doesnt work, but I dont use autoit very often and have never used an array with it before.This is how I would approach your problem, I believe all the logic is correct.Still looking for how to initialize arrays though, Ill edit it when I find out howexpandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=e:\apps\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080129.tu- checkbox gui.kxf $Form1_1 = GUICreate("Make selection ...", 374, 371, 193, 115) $Label1 = GUICtrlCreateLabel("Make selection:", 18, 13, 336, 24) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") Dim $cblogic[5]=[0,0,0,0,0] $Checkbox1 = GUICtrlCreateCheckbox("1", 25, 40, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox1Click") $Checkbox2 = GUICtrlCreateCheckbox("2", 25, 65, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox2Click") $Checkbox3 = GUICtrlCreateCheckbox("3", 25, 89, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox3Click") $Checkbox4 = GUICtrlCreateCheckbox("4", 25, 113, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox4Click") $Checkbox5 = GUICtrlCreateCheckbox("5", 25, 138, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "Checkbox5Click") $Button1 = GUICtrlCreateButton("OK", 115, 312, 65, 25, 0) ; left, top, width, height GUICtrlSetOnEvent(-1, "Click_OK") $Button2 = GUICtrlCreateButton("Cancel", 200, 312, 65, 25, 0) ; left, top, width, height GUICtrlSetOnEvent(-1, "Click_CANCEL") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Checkbox1Click() $cblogic[0] = 1 EndFunc Func Checkbox2Click() $cblogic[1] = 1 EndFunc Func Checkbox3Click() $cblogic[2] = 1 EndFunc Func Checkbox4Click() $cblogic[3] = 1 EndFunc Func Checkbox5Click() $cblogic[4] = 1 EndFunc Func Click_OK() For $x = 0 to 4 If $cblogic[$x] Then MsgBox(1, $x, "This should do something") EndIf Next EndFunc Func Click_CANCEL() Exit ; finished EndFuncEdit: whoops haha, forgot to change some numbers.. and I was in the middle of changing so many sections it doesnt even make sense .Whatever, you can still get the gist of it. Ill fix it when I figure out arraysFinal Edit: OK I fixed it all, the arrays work and all that nonsense. I tested it, the logic works fine and it runs smooth woohoo Im so high Im so sorry. I had the wrong amount in the array but I fixed it now. NOW it should be all good >.<wahaha Edit again!: http://pastebin.ca/903002Check that out, its a GUI I made a while back. Its a little long, but I used the checkboxes a lot. If you want to read through that, it may give you some new ideas (If you actually want to see it in action send me a message or something, cause I made it specifically for me and a few friends. You need to have a shortcut file to the game on your desktop, with auto-login enabled in the game, so I can give you details there) Edited February 13, 2008 by murdock Link to comment Share on other sites More sharing options...
rover Posted February 14, 2008 Share Posted February 14, 2008 (edited) just an example of checkbox creation with a groupbox and some sunken labels using arrays for control creation, label text and executed tasks repetitive controls like radio buttons, checkboxes or buttons can be created 'on the fly' in a For/Next loop take advantage of the features of GUIOnEventMode @GUI_CtrlId - Last click GUI Control identifier - use in functions with Switch allows for use of a single function for multiple buttons with @GUI_CtrlId expandcollapse popupFunc _Buttons() Switch @GUI_CtrlId ; GuiOnEventMode Last click GUI Control identifier Case $Button1 ; OK ; action Case $Button2 ; Cancel Exit Case $Button3 ; etc. EndSwitch EndFuncoÝ÷ ØÚ-xk¢Â)emë§ë)¢{"½è§r[xÆ+nØ¥j|©®²ÇWÂ+aFéÖj+h(^Q1yËyf¢¶+u±ßÛ騽çnwz˯"rÝبú+Ó~¢Ú«¢+Ø¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì(쥹±Õ±ÐíMÑÑ¥ ½¹ÍѹÑ̹ÔÌÐì()=ÁÐ ÅÕ½ÐíU%=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤(í=ÁÐ ÅÕ½Ðí5ÕÍѱÉYÉÌÅÕ½Ðì°Ä¤((I¥½¸MQIP-½U$ÍÑ¥½¸½É´õèÀäÈíÁÁÌÀäÈíÕѽ¥ÐÀäÈíѽ½±ÌÀäÈíѽ½±Õ¤´½ØĸܸÀÀäÈíÁÀ´½ØĸܸÀ¸ÄÀäÈí½ÉµÌäÈìÐàìàÀÄÈä¹ÑÔ´¡½àÕ¤¹á)1½°ÀÌØí½É´Å|Ä°ÀÌØí1°Ä°ÀÌØíIÕ¹1°°ÀÌØíɽÕÁ|Ä°ÀÌØí ÕÑѽ¸Ä°ÀÌØí ÕÑѽ¸È°ÀÌØíѽÀ°ÀÌØíQÍÌ)1½°ÀÌØí ¡½álÕulÉt쥹ÉÍɽ´ÔѼ¡¥¡È¹ÕµÈ½Èµ½É¡½áÌ¥¹(ÀÌØí ¡½álÁulÁtôÅÕ½ÐìÄ´IÕ¸9½ÑÁÅÕ½Ðì졽౱Ì(ÀÌØí ¡½álÁulÅtôÀ$$$$ìÉÍÉٽȡ½àÑɱ¥(ÀÌØí ¡½álÅulÁtôÅÕ½ÐìÈ´IÕ¸ ±ÅÕ½Ðì(ÀÌØí ¡½álÅulÅtôÀ(ÀÌØí ¡½álÉulÁtôÅÕ½ÐìÌ´IÕ¸]½ÉÁÅÕ½Ðì(ÀÌØí ¡½álÉulÅtôÀ(ÀÌØí ¡½álÍulÁtôÅÕ½ÐìдIÕ¸ ¡ÉµÀÅÕ½Ðì(ÀÌØí ¡½álÍulÅtôÀ(ÀÌØí ¡½álÑulÁtôÅÕ½ÐìÔ´IÕ¸5MA¥¹ÐÅÕ½Ðì(ÀÌØí ¡½álÑulÅtôÀ(ìÀÌØí ¡½álÕulÁtôÅÕ½ÐìØ´Iոѡ¥ÌͽÑÝÉÅÕ½Ðìì¥ÉÉäÍÐѼÀÌØí ¡½álÙulÉt(ìÀÌØí ¡½álÕulÅtôÀ(ì¹Í¼½¸¸¸¸()1½°ÀÌØíIÕ¹lÕt$$$$ìÉÉä½ÑÍÌ¡½ÁÑ¥½¹°¤Í ±¥¬ ¤Õ¹Ñ¥½¸¹½ÑÌ(ÀÌØíIÕ¹lÁtôÅÕ½Ðí¹½ÑÁ¹áÅÕ½Ðì$ìÁÑ ¹Áɽɴ(ÀÌØíIÕ¹lÅtôÅÕ½Ðí±¹áÅÕ½Ðì(ÀÌØíIÕ¹lÉtôÅÕ½ÐíݽÉÁ¹áÅÕ½Ðì(ÀÌØíIÕ¹lÍtôÅÕ½Ðí¡ÉµÀ¹áÅÕ½Ðì(ÀÌØíIÕ¹lÑtôÅÕ½ÐíµÍÁ¥¹Ð¹áÅÕ½Ðì((ÀÌØí½É´Å|ÄôU% ÉÑ ÅÕ½Ðí5ͱѥ½¸¸¸¸ÅÕ½Ðì°ÌÜаÌÜÄ°ÄäÌ°ÄÄÔ¤(ÀÌØí1°ÄôU% Ñɱ ÉÑ1° ÅÕ½Ðí5ͱѥ½¸èÅÕ½Ðì°Äà°ÄÌ°ÌÌØ°ÈаÀÌØíMM}MU9-8¤ì±Ð°Ñ½À°Ý¥Ñ °¡¥¡Ð)U% ÑɱMѽ¹Ð ´Ä°ÄÈ°ÐÀÀ°À°ÅÕ½Ðí5LM¹ÌMÉ¥ÅÕ½Ðì¤)U% ÑɱMÑ ½±½È ´Ä°Áá¤(ÀÌØíIÕ¹1°ôU% Ñɱ ÉÑ1° ÅÕ½ÐíM±ÐÑÍÌÅÕ½Ðì°Äà°ÈÜÔ°ÌÌØ°ÈаÀÌØíMM}MU9-8¤)U% ÑɱMѽ¹Ð ´Ä°ÄÈ°ÐÀÀ°À°ÅÕ½Ðí5LM¹ÌMÉ¥ÅÕ½Ðì¤)U% ÑɱMÑ ½±½È ´Ä°Áá¤((ìÕѽÉÍ¥éɽÕÁ½à½È¡½áÌ(ÀÌØíɽÕÁ|ÄôU% Ñɱ ÉÑɽÕÀ ÅÕ½ÐíQÍÌѼÉÕ¸¥¸ÍÅÕ¹ÅÕ½Ðì°Äà°ÔÀ°ÌÌØ°U ½Õ¹ ÀÌØí ¡½à¤¨ÌÀ¤(ÀÌØíѽÀôÜÀìѽÀ½¥ÉÍС½à½¹Ñɽ°()½ÈÀÌØí¤ôÀQ¼U ½Õ¹ ÀÌØí ¡½à¤´ÄìÉÑÌ̵¹ä¡½áÌÌ¥¸ÉÉä($ÀÌØí ¡½álÀÌØí¥ulÅtôU% Ñɱ ÉÑ ¡½à ÀÌØí ¡½álÀÌØí¥ulÁt°ÈÔ°ÀÌØíѽÀ°ÌÈÀ°ÈÀ¤ì±Ð°Ñ½À°Ý¥Ñ °¡¥¡Ð(%U% ÑɱMѽ¹Ð ´Ä°ÄÈ°ÐÀÀ°À°ÅÕ½Ðí5LM¹ÌMÉ¥ÅÕ½Ðì¤(%U% ÑɱMÑ ½±½È ´Ä°Áá¤($ÀÌØíѽÀ¬ôÈÔìÈÔ½È ¡½à)9áÐ((ÀÌØí ÕÑѽ¸ÄôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí=,ÅÕ½Ðì°ÄÄÔ°ÌÈÔ°ØÔ°ÈÔ°À¤ì±Ð°Ñ½À°Ý¥Ñ °¡¥¡Ð)U% ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí ±¥=,ÅÕ½Ðì¤(ÀÌØí ÕÑѽ¸ÈôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ¹°ÅÕ½Ðì°ÈÀÀ°ÌÈÔ°ØÔ°ÈÔ°À¤ì±Ð°Ñ½À°Ý¥Ñ °¡¥¡Ð)U% ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí}EÕ¥ÐÅÕ½Ðì¤)U%MÑ=¹Ù¹Ð ÀÌØíU%}Y9Q} 1=M°ÅÕ½Ðí}EÕ¥ÐÅÕ½Ðì°ÀÌØí½É´Å|Ĥ)U%MÑMÑÑ¡M]}M!=¤(¹I¥½¸9-½U$ÍÑ¥½¸()]¡¥±Ä(%M±À ÄÀÀÀÀ¤)]¹()Õ¹ ±¥=, ¤(%MÝ¥Ñ U%} Ñɱ%ìÕ¥=¹Ù¹Ñ5½1Íб¥¬U$ ½¹Ñɽ°¥¹Ñ¥¥È($% ÍÀÌØí ÕÑѽ¸Äì=,($$%U% ÑɱMÑMÑÑ ÀÌØí ÕÑѽ¸Ä°ÀÌØíU%}%M 1¤($$%U% ÑɱMÑMÑÑ ÀÌØí ÕÑѽ¸È°ÀÌØíU%}%M 1¤($$%½ÈÀÌØí¤ôÀQ¼U ½Õ¹ ÀÌØí ¡½à¤´Ä($$$%MÝ¥Ñ ¥Ñ9¡U% ÑɱI ÀÌØí ¡½álÀÌØí¥ulÅt¤°ÀÌØíU%} ! -¤($$$$% ÍÀÌØíU%} ! -($$$$$$ÀÌØíQÍ̵ÀìôÅÕ½ÐìlÅÕ½ÐìµÀìÀÌØí¤¬ÄµÀìÅÕ½ÐítÅÕ½Ðì($$$$$%U% ÑɱMÑÑ ÀÌØíIÕ¹1°°ÀÌØí ¡½álÀÌØí¥ulÁt¤ìÍб°Ñ¼ÕÉɹÐÑͬ($$$$$$ì¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼($$$$$$ì=ÁÑ¥½¸=¹($$$$$$ì Ñͬ¡ÉÉոɽ´ÉÉ䰥ѡÈÝ¥Ðչѥ°Áɽɴ¥¹¥Í IÕ¹]¥Ð ¤($$$$$$ì½È±Õ¹ ÁɽɵÌÝ¥Ñ IÕ¸ ¤¹½¹Ðݥнȥ¹¥Í ($$$$$$íIÕ¹]¥Ð ÀÌØíIÕ¹lÀÌØí¥t±]½É¥¹¥È¤ì½ÈIÕ¸½ÈM¡±±áÕѥͥ¹±ÉÕ¸ÑåÁ½¬°Ñ¸($$$$$$ì¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼($$$$$$ì½È($$$$$$ì¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼($$$$$$ì=ÁÑ¥½¸Qݼ($$$$$$ì½ÈÑÍÌÉÅեɥ¹µ½É½ÁɽÕÉÌ($$$$$%MÝ¥Ñ ÀÌØí¤($$$$$$% ÍÀìÅÕ½ÐìÄ´Iոѡ¥ÌͽÑÝÉÅÕ½Ðì($$$$$$$$ì¼Í½µÑ¡¥¹°Ñ¡¸¼¹áÐÑ¡¥¹($$$$$$$%IÕ¸ ÀÌØíIÕ¹lÀÌØí¥t°]½É¥¹¥È¤ì½¹ÐݥнÈÁɽɴ½ÈÍÉ¥ÁÐѼ¥¹¥Í ½É½¹Ñ¥¹Õ¥¹($$$$$$% ÍÄìÅÕ½ÐìÈ´Iոѡ¥ÌͽÑÝÉÅÕ½Ðì($$$$$$$%IÕ¹]¥Ð ÀÌØíIÕ¹lÀÌØí¥t°]½É¥¹¥È¤ìݥнÈÁɽɴ½ÈÍÉ¥ÁÐѼ¥¹¥Í ½É½¹Ñ¥¹Õ¥¹($$$$$$% ÍÈìÅÕ½ÐìÌ´Iոѡ¥ÌͽÑÝÉÅÕ½Ðì($$$$$$$%IÕ¸ ÀÌØíIÕ¹lÀÌØí¥t°]½É¥¹¥È¤($$$$$$% ÍÌìÅÕ½ÐìдIոѡ¥ÌͽÑÝÉÅÕ½Ðì($$$$$$$$($$$$$$% ÍÐìÅÕ½ÐìÔ´Iոѡ¥ÌͽÑÝÉÅÕ½Ðì($$$$$%¹MÝ¥Ñ ($$$$$$ì¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼¼($$$$$%U% ÑɱMÑMÑÑ ÀÌØí ¡½álÀÌØí¥ulÅt°ÀÌØíU%}U9 ! -¤ìÕ¹¡¬¡½àÌÑͬ½µÁ±Ñ($$$$$% À ÄÔÀÀ°Ô¤ì´Iµ½Ù´½ÈÑÍÑ¥¹½¹±ä($$$$$%M±À ÔÀÀ¤ì´Iµ½Ù´½ÈÑÍÑ¥¹½¹±ä($$$%¹MÝ¥Ñ ($$%9áÐ($$%U% ÑɱMÑMÑÑ ÀÌØí ÕÑѽ¸Ä°ÀÌØíU%}9 1¤($$%U% ÑɱMÑMÑÑ ÀÌØí ÕÑѽ¸È°ÀÌØíU%}9 1¤($$%U% ÑɱMÑÑ ÀÌØíIÕ¹1°°ÅÕ½Ðí¥¹¥Í¡ÑͬÅÕ½ÐìµÀìÀÌØíQÍ̤ìÉÍб°($$$ÀÌØíQÍÌôÅÕ½ÐìÅÕ½Ðì(%¹MÝ¥Ñ )¹Õ¹ìôôÐí ±¥¬()Õ¹}EեР¤(%á¥Ð)¹Õ¹ìôôÐí}EÕ¥ Edited February 14, 2008 by rover I see fascists... Link to comment Share on other sites More sharing options...
jokke Posted February 14, 2008 Share Posted February 14, 2008 Heres an example with the logic i made earlier. If you thought about using somewhat a AI to decide what to do. expandcollapse popup#include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=e:\apps\autoit\tools\toolgui- koda v1.7.0\app- koda v1.7.0.1\forms\080129.tu- checkbox gui.kxf $Form1_1 = GUICreate("Make selection ...", 374, 371, 193, 115) $Label1 = GUICtrlCreateLabel("Make selection:", 18, 13, 336, 24) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") Dim $Checkbox[5] $Checkbox[0] = GUICtrlCreateCheckbox("1", 25, 40, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Checkbox[1] = GUICtrlCreateCheckbox("2", 25, 65, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Checkbox[2] = GUICtrlCreateCheckbox("3", 25, 89, 97, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Checkbox[3] = GUICtrlCreateCheckbox("4", 25, 113, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Checkbox[4] = GUICtrlCreateCheckbox("5", 25, 138, 137, 20) ; left, top, width, height GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("OK", 115, 312, 65, 25, 0) ; left, top, width, height $Button2 = GUICtrlCreateButton("Cancel", 200, 312, 65, 25, 0) ; left, top, width, height GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg($Form1_1) Switch $msg Case $GUI_EVENT_CLOSE,$Button2 Exit Case $Button1 Dim $logic = "";On/Off logic 0/1 For $x = 0 to 4 Switch BitAnd(GUICtrlRead($Checkbox[$x]),$GUI_CHECKED) Case "0" ;Checked. $logic = $logic & "0" Case "1" ;UnChecked. $logic = $logic & "1" EndSwitch Next ConsoleWrite($logic&@CRLF) Switch $logic Case "00000" ConsoleWrite("None selected."&@CRLF) Case "10000" ConsoleWrite("1 selected."&@CRLF) Case "11000" ConsoleWrite("1,2 selected."&@CRLF) Case "00101" ConsoleWrite("3,5 selected"&@CRLF) EndSwitch EndSwitch WEnd UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Zedna Posted February 14, 2008 Share Posted February 14, 2008 Look here Resources UDF ResourcesEx UDF AutoIt Forum Search 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