Gillboss Posted April 6, 2008 Share Posted April 6, 2008 (edited) this is the code: GUICreate("aaaa", 540, 540, 100, 100) GUICtrlCreateGroup("bbbb", 10, 80, 210, 250) $optEeNormal = GUICtrlCreateRadio("asd", 20, 100, 190, 20) GUICtrlSetState(-1, $GUI_CHECKED) $optEePower = GUICtrlCreateRadio("dsa", 20, 120, 190, 20) $optSinPoint = GUICtrlCreateRadio("asdasd", 20, 140, 190, 20) $optMulPoints = GUICtrlCreateRadio("dsadsa", 20, 160, 190, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() why i get misstake? its something with the "GUICtrlSetState(-1, $GUI_CHECKED)". and more thing, how can i know which radio the user checked? Thanks! Edited April 6, 2008 by Gillboss Link to comment Share on other sites More sharing options...
JustinReno Posted April 6, 2008 Share Posted April 6, 2008 Whats the mistake? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2008 Developers Share Posted April 6, 2008 (edited) this is the code: GUICreate("aaaa", 540, 540, 100, 100) GUICtrlCreateGroup("bbbb", 10, 80, 210, 250) $optEeNormal = GUICtrlCreateRadio("asd", 20, 100, 190, 20) GUICtrlSetState(-1, $GUI_CHECKED) $optEePower = GUICtrlCreateRadio("dsa", 20, 120, 190, 20) $optSinPoint = GUICtrlCreateRadio("asdasd", 20, 140, 190, 20) $optMulPoints = GUICtrlCreateRadio("dsadsa", 20, 160, 190, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() why i get misstake? its something with the "GUICtrlSetState(-1, $GUI_CHECKED)". and more thing, how can i know which radio the user checked? Thanks! Have you looked at the helpfile example for GUICtrlCreateRadio() ? Both questions should be answered when you follow the example. Edited April 6, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Gillboss Posted April 6, 2008 Author Share Posted April 6, 2008 (edited) Whats the mistake?look:Have you looked at the helpfile example for GUICtrlCreateRadio() ?Both questions should be answered when you follow the example.where it? Edited April 6, 2008 by Gillboss Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2008 Developers Share Posted April 6, 2008 where it?You mean: Where is the HelpFile ?In the AutoIt3 program directory. In SciTE4AutoIt3 press F1 .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Gillboss Posted April 6, 2008 Author Share Posted April 6, 2008 oh found so, this the code: #include <GUIConstants.au3> GUICreate("My GUI radio") ; will create a dialog box that when displayed is centered $radio1 = GUICtrlCreateRadio ("Radio 1", 10, 10, 120, 20) $radio2 = GUICtrlCreateRadio ("Radio 2", 10, 40, 120, 20) GUICtrlSetState ($radio2, $GUI_CHECKED) GUISetState () ; will display an dialog box with 1 checkbox ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.') Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.') EndSelect Wend so where to change and what to change in my project? Link to comment Share on other sites More sharing options...
Gillboss Posted April 6, 2008 Author Share Posted April 6, 2008 here? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2008 Developers Share Posted April 6, 2008 The example has all needed information. Try to understand it and you will have the answer. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Gillboss Posted April 6, 2008 Author Share Posted April 6, 2008 (edited) in my project have information too, no? Edited April 6, 2008 by Gillboss Link to comment Share on other sites More sharing options...
JustinReno Posted April 6, 2008 Share Posted April 6, 2008 No, it doesn't, you still need to study the example, if you don't get it then you shouldn't be on here. Link to comment Share on other sites More sharing options...
Gillboss Posted April 13, 2008 Author Share Posted April 13, 2008 i realy dont know what wrong please somone tell me why.. Link to comment Share on other sites More sharing options...
martin Posted April 13, 2008 Share Posted April 13, 2008 i realy dont know what wrong please somone tell me why..The error you showed in post #4 was that a variable or constant was unknown. The $GUI_.. constants are defined in the include file GUICONSTANTS.AU3, so if you add the first line of the example to the first line of your script it should remove that error. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Gillboss Posted April 13, 2008 Author Share Posted April 13, 2008 (edited) thank you thank you thank you :):):) Edited April 13, 2008 by Gillboss 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