Sign in to follow this  
Followers 0
kesin

Finding Files In The Windows Filesystem

6 posts in this topic

I'm in the process of writing a script to simplify use of a command line utility. As parameters the utility requires that the user pass in file names and locations. What I was wondering is if anyone has a method of using something similar to the browse frature on instilation programs that will allow the user to use a GUI to browse through the file system to the files that they are looking for. I'd rather not have to reinvent the wheel as it were to accomplish this.

Forgive me if how to do this already exists in the forums somewhere in the forums but i have been unable to find anything. Any help you guys could provide would be much appreciated.

Kesin

Share this post


Link to post
Share on other sites



I'm in the process of writing a script to simplify use of a command line utility. As parameters the utility requires that the user pass in file names and locations. What I was wondering is if anyone has a method of using something similar to the browse frature on instilation programs that will allow the user to use a GUI to browse through the file system to the files that they are looking for. I'd rather not have to reinvent the wheel as it were to accomplish this.

Forgive me if how to do this already exists in the forums somewhere in the forums but i have been unable to find anything. Any help you guys could provide would be much appreciated.

Kesin

If I am understanding correctly you need something like FileOpenDialog


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Interesting Scruits, I may end up using them in some future endavors, but not quite what I am looking for right now. What I am looking to do is create buttons that perform the same function as the browse button in the script compiler.

Share this post


Link to post
Share on other sites

If I am understanding correctly you need something like FileOpenDialog

It looks like that's precisely what i was looking for.

Thanks Much

Share this post


Link to post
Share on other sites

It looks like that's precisely what i was looking for.

Thanks Much

Here is a rough example

#include <GUIConstants.au3>
$Form1 = GUICreate("AForm1", 328, 173, 192, 125)
$Input1 = GUICtrlCreateInput("", 32, 56, 169, 21)
$Button1 = GUICtrlCreateButton("Browse", 224, 56, 57, 25, 0)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        $select = FileOpenDialog( "Select File", "c:\" , "All(*.*)")
        ControlSetText( "", "", $Input1, $select)
    Case Else
    ;;;;;;;
    EndSelect
WEnd


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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  
Followers 0