Jump to content

FileSelectFolder tip of the day


qwert
 Share

Recommended Posts

Recently, I’ve started using FileSelectFolder(...) in a script that I use daily. I was puzzled—then frustrated—by the fact that even with a defined “initial dir”, the select dialog always stated back at the base Desktop ... which meant I had to navigate down the tree every time I wanted to select a different directory.

 

Seeking some solution, I went through the different FileSelectFolder alternatives in the example forum. But they each addressed other issues and I found no option for something this simple.

 

I was about out of things to look at when I googled select expand expand and found this:

 

http://www.howtogeek.com/102905/set-the-navigation-pane-tree-to-automatically-expand-in-windows-7/

 

It clearly explains the Navigation pane >> Automatically expand to current folder option in Windows Explorer.

 

I clicked it on and “Problem Solved”! So it had nothing to do with the FileSelectFolder call. And it explains why FileSelectFolder doesn’t have an option for expanding. Only, I didn’t know there was any such setting.  Heck, I didn't even know that Windows Explorer was used verbatim by the dialog (as opposed to some dll call).   And BTW, you can’t change this option from an active selection dialog. You have to start a copy of Windows Explorer and change it there. 

 

The reason I never noticed this setting is that I don’t use Windows Explore for any of my other file management. (I use a 3rd party file manager.).

 

I don’t know if this posting will do anyone any good—or if I’m the only person who didn’t know of this. But I figured I should pass this along, for the sake of new AutoIt users—or someone like me.

 

Link to comment
Share on other sites

  • Moderators

qwert,

Take a look at my ChooseFileFolder UDF - a bit more configurable than the basic dialog. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

@qwert - That is no doubt handy to know, but I stopped using the tree years ago, for most things. Tend to only see it and use it in the dialogs. The trick I've found with FileSelectFolder, is what you provide in both the elements. The Initial Directory is not the only important element you need to specify (or correctly). Same works for the FileOpenDialog. They gave me grief until I realized that

I would check out Melba23's UDF though.

P.S. I just checked, and noticed I have the 'Show All Folders' option selected, but not the other 'Automatically Expand .....'

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Indeed, I've used Melba's UDF (... back in August, I think) in one of my scripts, where I needed more detailed control.  But what I've described is behavior of the plain FileSelectFolder that people start with and that many scripts end up using just because it's the default choice—even if it does have these caveats.

But I'll have another look at the UDF when I get time.

Thanks for the added information.

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...