eri Posted February 21, 2010 Share Posted February 21, 2010 #include <GUIConstantsEx.au3> #include <GUIComboBox.au3> $Gui = GUICreate("Combo", 350, 100) $Combo = GUICtrlCreateCombo("", 10, 10) ;$var = DriveGetFileSystem( "FAT32" ) _GUICtrlComboBox_AddDir($Combo, "", $DDL_DRIVES, False) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I want Create ComboBox Only Show Fat and Fat32 Partition...?? Link to comment Share on other sites More sharing options...
MvGulik Posted February 21, 2010 Share Posted February 21, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
Fire Posted February 21, 2010 Share Posted February 21, 2010 #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=fghfs.kxf $Form1 = GUICreate("Form1", 395, 150, 192, 124) $Combo1 = GUICtrlCreateCombo("Combo1", 96, 40, 161, 25) _GUICtrlComboBox_AddDir($Combo1, "", $DDL_DRIVES, False) $Button1 = GUICtrlCreateButton("Button1", 136, 112, 89, 17, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(64,"FILESYSTEM OF SELECTED DRIVE",GUICtrlRead($Combo1) & " is " & DriveGetFileSystem(GUICtrlRead($Combo1))) EndSwitch WEnd [size="5"] [/size] Link to comment Share on other sites More sharing options...
BrettF Posted February 21, 2010 Share Posted February 21, 2010 Simple helper function. #include <GUIConstantsEx.au3> #include <GUIComboBox.au3> $Gui = GUICreate("Combo", 350, 100) $Combo = GUICtrlCreateCombo("", 10, 10) _AddDrives ($Combo, "FAT32|FAT") GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;$hCombo -> Handle to combo box ;$sFileSystem -> String with a combinationfile systems to include. Deliminated by "|". Can be any of the following: ; -FAT ; -FAT32 ; -NTFS ; -NWFS ; -CDFS ; -UDF Func _AddDrives ($hCombo, $sFileSystem) $aDrives = DriveGetDrive ("ALL") For $i = 1 to $aDrives[0] $sys = DriveGetFileSystem ($aDrives[$i]) If StringRegExp ($sys, "(" & $sFileSystem & ")") = 1 Then _GUICtrlComboBox_AddString ($hCombo, $aDrives[$I]) Next EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
eri Posted February 21, 2010 Author Share Posted February 21, 2010 In My Com.. C,D,F is NTFS G and H is Removable FAT32 I want Create ComboBox Only Show Drive G and H..??? Link to comment Share on other sites More sharing options...
eri Posted February 21, 2010 Author Share Posted February 21, 2010 Thank`S BrettF You Answer My Question.. Link to comment Share on other sites More sharing options...
Yoriz Posted February 21, 2010 Share Posted February 21, 2010 #include <GUIConstantsEx.au3> #include <GUIComboBox.au3> $Gui = GUICreate("Combo", 350, 100) $Combo = GUICtrlCreateCombo("", 10, 10) $var = DriveGetDrive( "all" ) Local $sDrives If NOT @error Then For $i = 1 to $var[0] If DriveGetFileSystem($var[$i] & "\") = "FAT32" Then $sDrives = $sDrives & $var[$i] & "|" EndIf Next EndIf GUICtrlSetData($Combo,StringTrimRight($sDrives,1)) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF. Link to comment Share on other sites More sharing options...
Fire Posted February 21, 2010 Share Posted February 21, 2010 + This way too. expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> Dim $avarray $value="A:\" & @CRLF & "B:\" & @CRLF & "C:\" & @CRLF & "D:\" & @CRLF & "E:\" & @CRLF & "F:\" & @CRLF & "G:\" & @CRLF & "H:\" & @CRLF & "I:\" & @CRLF & "J:\" & @CRLF & "K:\" & @CRLF & "L:\" & @CRLF & "M:\" & @CRLF & "N:\" & @CRLF & "O:\" & @CRLF & "P:\" & @CRLF & "Q:\" & @CRLF & "R:\" & @CRLF & "S:\" & @CRLF & "T:\" _ & @CRLF & "U:\" & @CRLF &"V:\" & @CRLF &"W:\" & @CRLF & "X:\" & @CRLF & "Y:\" & @CRLF & "Z:\" FileWrite(@TempDir & "\temp.ini",$value) _FileReadToArray(@TempDir & "\temp.ini",$avarray) FileDelete(@TempDir & "\temp.ini") $Form1 = GUICreate(":::", 395, 150, 192, 124) $Combo1 = GUICtrlCreateCombo("", 96, 40, 161, 25) For $i=0 To $avarray[0] If DriveGetFileSystem($avarray[$i]) = "FAT32" Then GUICtrlSetData($Combo1,$avarray[$i]) EndIf Next $Button1 = GUICtrlCreateButton("Check", 136, 112, 89, 17, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(64,"FILESYSTEM OF SELECTED DRIVE",GUICtrlRead($Combo1) & " is " & DriveGetFileSystem(GUICtrlRead($Combo1))) EndSwitch WEnd [size="5"] [/size] 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