JSThePatriot Posted February 17, 2005 Share Posted February 17, 2005 I am having trouble, and have yet to find anything relating to this in the forums. Below is the code, but I'll explain what is going on first. I am creating a program and I have the need to use radio buttons off the start to narrow what the user needs displayed down to a minimum. I like the little line going around the group. Kinda shows that they are together. I have it working on the first group created. I cant get it to work on the second group. I even tried removing the 'close group' stuff that doesnt even make sense. I still only have a line around the first one. Maybe something in the help file having to do with closing a group would be useful. There really isnt much of an explanation there, not that I could find anyways. Here is the code: expandcollapse popup;=============================================================================== ; ; Script Name: Scheduler+ 1.0 ; Description: Schedules scripts or programs to run at a specified time. ; Parameter(s): None ; Requirement(s): None ; Return Value(s): None ; Author(s): Jarvis Stubblefield ; ;=============================================================================== #include <GUIConstants.au3> ;Opt("TrayIconHide", 1) Opt("MustDeclareVars", 1) ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<==== Declare Variables ====> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Dim $msg Dim $VRVersion, $row1, $row2, $row3, $GUIWidth, $GUIHeight Dim $Sunday, $Monday, $Tuesday, $Wednesday, $Thursday, $Friday, $Saturday Dim $rdoOnce, $rdoRecurring, $rdoYearly, $rdoMonthly, $rdoWeekly, $rdoDaily, $rdoHourly Dim $cmbDays, $cmbData, $cmbDate ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<==== Set Variables ====> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;Set day values. $Sunday = 1 $Monday = 2 $Tuesday = 3 $Wednesday = 4 $Thursday = 5 $Friday = 6 $Saturday = 7 ;Set version. $VRVersion = "Scheduler+ 1.0" ;Set GUI Variables $row1 = 10 $row2 = 95 $row3 = 150 $GUIHeight = 250 $GUIWidth = 350 ;Create GUI GUICreate("Scheduler+", $GUIWidth, $GUIHeight) ;Create gui date box for one time schedule ;$cmbDate = GUICtrlCreateDate("Select a Date", 10, $row2) ;Create radio buttons for first options GUICtrlCreateGroup("Select a Schedule", 10, $row1, 106, 70);Open group $rdoOnce = GUICtrlCreateRadio("Once", 20, 30) $rdoRecurring = GUICtrlCreateRadio("Recurring", 20, 50) ;GUICtrlCreateGroup("", -99, -99, 1, 1);Close group ;Create radio buttons for second options GUICtrlCreateGroup("Select a Time Period", 10, $row2, 1, 110);Open group $rdoYearly = GUICtrlCreateRadio("Yearly", 20, 115) $rdoMonthly = GUICtrlCreateRadio("Monthly", 20, 135) $rdoWeekly = GUICtrlCreateRadio("Weekly", 20, 155) $rdoDaily = GUICtrlCreateRadio("Daily", 20, 175) $rdoHourly = GUICtrlCreateRadio("Hourly", 20, 195) ;GUICtrlCreateGroup("", -99, -99, 1, 1);Close group ;Create a combo box with the days of the week ;$cmbDays = GUICtrlCreateCombo("Sunday", 10, $row3, 100) ;GUICtrlSetData($cmbDays, "Monday|Tuesday|Wednesday|Thursday|Friday|Saturday") ;Hide controls for use only when needed GUICtrlSetState($cmbDays, $GUI_DISABLE) GUICtrlSetState($cmbDate, $GUI_DISABLE) ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<==== Run Single ONLY ====> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;Check to see if this version of Scheduler+ is already running. If WinExists($VRVersion) Then Exit; It's already running AutoItWinSetTitle($VRVersion) ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ;<==== Program Begin ====> ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $cmbDays $cmbData = GUICtrlRead($cmbDays) Case $msg = $rdoOnce GUICtrlSetState($cmbDays, $GUI_DISABLE) GUICtrlSetState($cmbDate, $GUI_ENABLE) Case $msg = $rdoRecurring GUICtrlSetState($cmbDate, $GUI_DISABLE) GUICtrlSetState($cmbDays, $GUI_ENABLE) Case $msg = $cmbDate $cmbData = GUICtrlRead($cmbDate) MsgBox(0, "test", $cmbData) EndSelect WEnd Sorry if that is too long... That is just how I have it as of now. Thanks, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) Link to comment Share on other sites More sharing options...
phillip123adams Posted February 17, 2005 Share Posted February 17, 2005 I have it working on the first group created. I cant get it to work on the second group.GUICtrlCreateGroup("Select a Time Period", 10, $row2, 1, 110);Open group<{POST_SNAPBACK}>Recheck the width of the second group, it's set to 1. Also look at the other controls as they need a width or height adjustment too. Phillip 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