silencexx Posted October 17, 2005 Share Posted October 17, 2005 (edited) Hello my friends! I made something like this:#include <GUIConstants.au3> GUICreate("My GUI Checkbox"); will create a dialog box that when displayed is centered $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 2", 10, 30, 120, 20) $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 3", 10, 50, 120, 20) $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 4", 10, 70, 120, 20) $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 5", 10, 90, 120, 20) $checkCN = GUICtrlCreateCheckbox ("CHECKBOX 6", 10, 110, 120, 20) Opt("GUICoordMode",2) GUICtrlCreateButton ("next", 10, 30, 50) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WendHow can I do that, when I mark some of this "checkbox", for example three of them checkbox1, checkbox3, checkbox5, than I press button "next" this "checkbox1, checkbox3, checkbox5" will be write on some file checkbox.txt or checkbox.cmdSorry for my English, I hope so U now what I mean.10x 4 help!! Regards!!! Edited October 17, 2005 by silencexx Link to comment Share on other sites More sharing options...
seandisanti Posted October 17, 2005 Share Posted October 17, 2005 (edited) How can I do that, when I mark some of this "checkbox", for example three of them checkbox1, checkbox3, checkbox5, than I press button "next" this "checkbox1, checkbox3, checkbox5" will be write on some file checkbox.txt or checkbox.cmdSorry for my English, I hope so U now what I mean.10x 4 help!! Regards!!!i think this is what you're looking for: (new code in red)$checkCN1 = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20)$checkCN2 = GUICtrlCreateCheckbox ("CHECKBOX 2", 10, 30, 120, 20)$checkCN3 = GUICtrlCreateCheckbox ("CHECKBOX 3", 10, 50, 120, 20)$checkCN4 = GUICtrlCreateCheckbox ("CHECKBOX 4", 10, 70, 120, 20)$checkCN5 = GUICtrlCreateCheckbox ("CHECKBOX 5", 10, 90, 120, 20)$checkCN6 = GUICtrlCreateCheckbox ("CHECKBOX 6", 10, 110, 120, 20)Opt("GUICoordMode",2)$ThisIsTheButton = GUICtrlCreateButton ("next", 10, 30, 50)While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop if $msg = $ThisIsTheButton then $output = "" for $x = 1 To 6 If GUICtrlRead(Eval("$checkcn" & $x)) = $GUI_CHECKED Then $output = $output & "checkbox" & $x & "," Next FileWrite("C:\output.txt",$output) MsgBox(0,"done","Checkboxes output to text file") Exit EndIfWEnd***edit*** sorry for no codebox, but i wasn't able to do color in the code box... Edited October 17, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
silencexx Posted October 17, 2005 Author Share Posted October 17, 2005 (edited) yes, looks great!! but is this working??? I had problem to run this, thats mean I run script and no new window is opened. I think It exaclly what I look for, but don't now why its not start :/ EDIT: Ok, now it's working I added GUISetState() Your file create new file but do not put text (4 example: checkbox1, checkbox2, etc when I mark it, and than push "next" button... Any way thx for fast halp Edited October 17, 2005 by silencexx Link to comment Share on other sites More sharing options...
seandisanti Posted October 17, 2005 Share Posted October 17, 2005 yes, looks great!! but is this working??? I had problem to run this, thats mean I run script and no new window is opened.I think It exaclly what I look for, but don't now why its not start :/that's not a full script, just a modification of the script segment that you posted...you still need to create and display your gui with other code that you probably already have. just open your original code, and put my segment in where your segment was. 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