firestrife23 Posted July 20, 2008 Share Posted July 20, 2008 I'm new to autoit scripting, and i'm picking up pace quite well, so easy to learn! however how do I restrict to only one check box may be selected, I don't want novice to pick out more than 1 and screw up whole process you know. Here's portion of codes I did so far... #include <GUIConstants.au3> GUICreate("Addons Packages Flavors", 300, 125) $LABEL = GUICtrlCreateLabel("Please choose one flavor", 10, 10, 150, 20) $CHECK = GUICtrlCreateCheckbox(" Advanced", 10, 30, 120, 20) $CHECK1 = GUICtrlCreateCheckbox(" Basic", 10, 50, 120, 20) $CHECK2 = GUICtrlCreateCheckbox(" Guild Mandatory Files", 10, 70, 120, 20) $DONE = GUICtrlCreateButton("Install", 200, 60, 60, 25) GUISetState() While 1 $MSG = GUIGetMsg() $READ2 = GUICtrlRead($CHECK) $READ3 = GUICtrlRead($CHECK1) $READ4 = GUICtrlRead($CHECK2) If $MSG = $DONE Then If $READ2 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i alist.txt", @ScriptDir, "", @SW_HIDE) ElseIf $READ3 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i blist.txt", @ScriptDir, "", @SW_HIDE) ElseIf $READ4 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i glist.txt", @ScriptDir, "", @SW_HIDE) EndIf EndIf If $MSG = $GUI_EVENT_CLOSE Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
DW1 Posted July 20, 2008 Share Posted July 20, 2008 Use a radio instead of a checkbox, #include <GUIConstants.au3> GUICreate("Addons Packages Flavors", 300, 125) $LABEL = GUICtrlCreateLabel("Please choose one flavor", 10, 10, 150, 20) $CHECK = GUICtrlCreateRadio(" Advanced", 10, 30, 120, 20) $CHECK1 = GUICtrlCreateRadio(" Basic", 10, 50, 120, 20) $CHECK2 = GUICtrlCreateRadio(" Guild Mandatory Files", 10, 70, 120, 20) $DONE = GUICtrlCreateButton("Install", 200, 60, 60, 25) GUISetState() While 1 $MSG = GUIGetMsg() $READ2 = GUICtrlRead($CHECK) $READ3 = GUICtrlRead($CHECK1) $READ4 = GUICtrlRead($CHECK2) If $MSG = $DONE Then If $READ2 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i alist.txt", @ScriptDir, "", @SW_HIDE) ElseIf $READ3 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i blist.txt", @ScriptDir, "", @SW_HIDE) ElseIf $READ4 = $GUI_CHECKED Then ProgressSet(20 , "20 Precent", "Downloading Addons...") ShellExecuteWait( "wget", "--directory-prefix=download -N -i glist.txt", @ScriptDir, "", @SW_HIDE) EndIf EndIf If $MSG = $GUI_EVENT_CLOSE Then ExitLoop WEnd AutoIt3 Online Help Link to comment Share on other sites More sharing options...
firestrife23 Posted July 20, 2008 Author Share Posted July 20, 2008 (edited) you rock! thx! Edit: how do i make it disappear after clicking "install" button? Edited July 20, 2008 by firestrife23 Link to comment Share on other sites More sharing options...
d4rk Posted July 20, 2008 Share Posted July 20, 2008 GUICtrlSetState($CHECK,$GUI_HIDE) [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
firestrife23 Posted July 21, 2008 Author Share Posted July 21, 2008 GUICtrlSetState($CHECK,$GUI_HIDE)that work, thx again 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