omnomnom 0 Posted May 11, 2010 This is where a user inputs their drive, it then adds the :\ and get the filesystem. Here is the relevant code; $driveletter = guictrlread($Input1) $actualdrive = $driveletter & ":\" $drivetype = DriveGetFileSystem($actualdrive) and case $Button2 guictrlsetdata($Label1, $drivetype) However it sets my label to be blank, can anyone help? thanks! Share this post Link to post Share on other sites
Melba23 3,455 Posted May 11, 2010 omnomnom,What you have posted works perfectly for me. What does the rest of your code look like?For example, is $drivetype a Local variable so that there is nothing to display when you try? 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 Share this post Link to post Share on other sites
Xenobiologist 47 Posted May 11, 2010 What about some more code, or trying to add some error checking? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Share this post Link to post Share on other sites
omnomnom 0 Posted May 11, 2010 (edited) I found the problem. I was putting the $ data at the beginning just after the GUI, not in the case section. Thanks anyway guys. Is there any way to make a dropdown menu with the list of current available drives? Edited May 11, 2010 by omnomnom Share this post Link to post Share on other sites
hawky358 0 Posted May 11, 2010 This will give you a list of all the drives on your system ... $alldrives = DriveGetDrive("ALL") GUICreate("List") $List = GUICtrlCreateCombo("",10,10) for $i = 1 to ubound($alldrives) -1 GUICtrlSetData($List,$alldrives[$i],$alldrives[1]) Next GUISetState(@SW_show) while 1 sleep(50) WEnd Share this post Link to post Share on other sites