Jump to content

FileSelectFolder only if valid directory


Recommended Posts

Is it possible to only allow the selection of a direrectory [through FileSelectFolder] if a certain file is present (so the "Open" button stays grayed out until a valid directory has been selected; that being a directory where said file is present)?

Edited by faire
Link to comment
Share on other sites

*bump*

I'm now checking if the directory is valid in another function. Still it would be interesting to know if anyone has an answer to this question. It'd be a nice feature in my opinion.

Link to comment
Share on other sites

*bump*

I'm now checking if the directory is valid in another function. Still it would be interesting to know if anyone has an answer to this question. It'd be a nice feature in my opinion.

You would have to recreate the gui yourself as i believe that function pauses the wholes script stopping you from disabling the button or re-enabling it this is the only solution i see other than have two scripts do it one runs that function the other watches and disables then enables the button.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Is it possible to only allow the selection of a direrectory [through FileSelectFolder] if a certain file is present (so the "Open" button stays grayed out until a valid directory has been selected; that being a directory where said file is present)?

You can check a selected folder validation after choosing, e.g.:

Do
    $SelectFolder = FileSelectFolder("Choose a folder...", "", 0, @DesktopDir)
Until StringInStr($SelectFolder, @DesktopDir) > 0

MsgBox(0, "", $SelectFolder)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...