Jump to content
Sign in to follow this  
vboost

looking for a basic hard drive choice GUI

Recommended Posts

that i can then choose the drive from the list that autoit detects, and run a script based on this.

Im trying to learn GUI features in Autoit, and am not sure as to which type og GUI interface i should be using [list/button etc.]

Share this post


Link to post
Share on other sites

$var = FileOpenDialog("Select Drive", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "All (*)")

Only problem is that it shows all drives

Edit - Ignore as it only shows drives but does not allow selection

Edited by BigDod


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Try this one

#include <GUIConstants.au3>
#include <GuiList.au3>

$Form1 = GUICreate("AForm1", 253, 307, 193, 115)
$List1 = GUICtrlCreateList("", 32, 16, 177, 149)
$ret = _GUICtrlListAddDir ($list1, "Drives")
         
$Button1 = GUICtrlCreateButton("Select Drive", 72, 216, 105, 33, 0)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(0,"You Selected",GUICtrlRead($List1))
    EndSwitch
WEnd


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...