eri Posted March 25, 2010 Share Posted March 25, 2010 I have create combo show all and removable drive when checkbox = checked will show all drive.. But when checkbox = checked my processor up to 98% (frezz) This is.. #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) Local $msg, $Checkbox1, $var Example() Func Example() GUICreate("My GUI combo") $Checkbox1 = GUICtrlCreateCheckbox("See All", 10, 10, 97, 17) GUICtrlCreateCombo("", 30, 30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then $var = DriveGetDrive( "all" ) ;< i want when show all drive, removable drive will be disable Getdrive() Else $var = DriveGetDrive( "Removable" ) ;<i want when show removable drive, all drive will be disable Getdrive() EndIf WEnd EndFunc Func Getdrive() If NOT @error Then For $i = 1 to $var[0] GUICtrlSetData(-1, $var[$i]) Next EndIf EndFunc please help me.. Add and modive sample script from help file.. Thank you.. Link to comment Share on other sites More sharing options...
bogQ Posted March 25, 2010 Share Posted March 25, 2010 Something like this? #include <GUIConstantsEx.au3> $1=0 GUICreate("My GUI combo") $Checkbox1 = GUICtrlCreateCheckbox("See All", 10, 10, 97, 17) $c1 = GUICtrlCreateCombo("", 30, 30) $c2 = GUICtrlCreateCombo("", 30, 30) $var = DriveGetDrive( "all" ) If NOT @error Then For $i = 1 to $var[0] GUICtrlSetData($c1, $var[$i]) Next EndIf $var = DriveGetDrive( "Removable" ) If NOT @error Then For $i = 1 to $var[0] GUICtrlSetData($c2, $var[$i]) Next EndIf GUICtrlSetState($c1, $GUI_HIDE) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case GUICtrlRead($Checkbox1) = $GUI_CHECKED And $1 = 0 GUICtrlSetState($c1, $GUI_SHOW) GUICtrlSetState($c2, $GUI_HIDE) $1 = 1 Case GUICtrlRead($Checkbox1) <> $GUI_CHECKED And $1 = 1 GUICtrlSetState($c2, $GUI_SHOW) GUICtrlSetState($c1, $GUI_HIDE) $1 = 0 EndSelect WEnd TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 25, 2010 Moderators Share Posted March 25, 2010 eri, Please stop adding my name to your post titles. As you can see from bogQ's excellent reply above, there are lots of people here to help you. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
eri Posted March 25, 2010 Author Share Posted March 25, 2010 eri,Please stop adding my name to your post titles. As you can see from bogQ's excellent reply above, there are lots of people here to help you. M23@ bogQ thank you.. @ M23.. I`m sorry.. I will not do it 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