Sign in to follow this  
Followers 0
Hindry

Browsing for a File

4 posts in this topic

Hi,

I've just started using AutoIt V3 today and have a question.

I need to select a directory that contains files that I need to process. To select the directory I need to browse to it (I cannot type the name in or this would be easy to do). Therefore, I have a window which has "OK" and "Cancel" as options and a typical Explorer type listing. I need to expand a number of folders to find the folder that I want but I cannot work out how to do this.

Once I've worked out how to do this I will need to cycle through several hundered folders (in a loop) processing the files in each. They are numbered sequentially but I don't think that this is going to be of much assistance here. I did think about using the mouse position to clink in the correct place but, to my mind, this will be a little hit and miss and I will need to scroll further down the list to find the folder that I need as I progress through the loop.

Any help would be much apprecaited.

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

HI, and welcome..:)

Take a look at the helpfile in the File, Directory and disk management sections.

1: FileSelectFolder.

2: FileFindFirst, FileFindNext

FileFindFirst, FileFindNext are not really fast so you should search for +runwait +comspec + dir in the forum. Something like

runwait(@comspec & "/C dir /S /B >'" & $tempfile & "'")

When it reurns you would need FileRead or FileReadLine to parse $tempfile.

Happy Scripting

Edited by Uten

Share this post


Link to post
Share on other sites

Thanks very much for the rapid reply and the welcome.

I've had a look at the section that you mentioned and I don't think it does exactly that I need to do.

I have a window that pops up as a result of a previous piece of scrpiting and I need to drill down to the folder that I want within this window. I've just been trying to navigate using arrow buttons and 'enter' as an alternative. I think that this may work although it is a little cumbersome. If there's an easier method I'd be pleased to hear of it.

Thanks again.

Share this post


Link to post
Share on other sites

Thanks very much for the rapid reply and the welcome.

I've had a look at the section that you mentioned and I don't think it does exactly that I need to do.

I have a window that pops up as a result of a previous piece of scrpiting and I need to drill down to the folder that I want within this window. I've just been trying to navigate using arrow buttons and 'enter' as an alternative. I think that this may work although it is a little cumbersome. If there's an easier method I'd be pleased to hear of it.

Thanks again.

Care to provide a sample of that? Other ways I'm all out of suggestions.

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