Hot Folders

18 posts in this topic

WideBoyDixon 8

Quite a few changes to this now. Here's what I remember that I've done:

Made the application localizable by using an INI file based on the current user's LCID. If it's not there then you'll get the English strings which you can then change by editing the HFxxxx.INI file that gets created.

Removed the keyboard hook as it was conflicting with the hotkey setting.

Added the ability to configure the hotkeys used for the application functionality.

Added an about tab for shameless self-promotion :-)

The dialog is created and destroyed on the fly rather than being permanently created. I've also used Koda to design it (now that I've got the hang!)

Fixed the problem with the address bar not being displayed in Windows Explorer

Added "Special" folders to the shortcut menu

Split this into multiple scripts with a view to re-using some functionality in other projects. You need to load up _HotFolders_v0.4.0.au3.

The updated ZIP file is attached and is much smaller as I've removed some image formats from the icon file.

------------------------------

V0.3.0

Seems like AutoIt scripts are addictive! I've added an option for a shortcut menu on file open/save dialogs. Pressing [Ctrl]- will bring up a menu with a list of "Active" and "Hot" folders. "Active" folders are ones currently open in an explorer window. "Hot" folders are the ones configured in the dialog. I'm considering adding an application specific history to this menu as well but I'm not sure whether it will be useful. There's also an option to remove the current filter by forcing "*.*" into the selection. Description below updated.

Thanks to Ascend4nt and lod3n for the _WinAPI_ProcessGetFilename UDF.

Thanks to happy2help for updating the UI.

------------------------------

V0.2.0

Suggestions from happy2help included. There's now a menu for the folders on the tray icon. Also, the first available item in the list is selected when the dialog is created.

------------------------------

I used to use a tool called Dirkey NTXP to provide fast access to commonly used folders. However, the program is no longer maintained and it doesn't support everything I'd like it to. The only other tool that comes near right now is FlashFolders but this installs itself as a service which makes me jumpy and it still doesn't provide everything I'd like. To this end, I present my very first complete script called "Hot Folders". A quick user guide:

Use [Ctrl][Win]- to bring up the settings dialog. From here you can:

Select an item in the list using the mouse or a numeric key 0-9.

Double click an item or use the "Browse" button to change the associated folder.

Use the "Clear" button to remove the association for a number.

Click "Explore" to run Windows Explorer for the currently selected folder.

Choose whether Windows Explorer will open with the folders shown on the left (or not).

Click "Close" to minimise the dialog to the system tray.

In use, you use [Ctrl][Win] and a numeric key (0-9) to quickly switch to the associated folder from the settings dialog. The exact behaviour of this key combination depends on the currently active window. Supported windows are:

The Windows built-in common file open/save dialog

The MS Office file open/save dialogs

The Visual Studio 2005/2008 file open/save dialogs

Windows Explorer

For 1 to 3 the hotkey will change the currently active folder for the dialog. For 4 it will browse to the associated folder. If the currently active window is not a supported type then the key combination will open a Windows Explorer window with the associated folder selected.

You can also use [Ctrl]- when the currently active dialog is a file open/save dialog. This will create a shortcut menu from which you can select one of your configured folders or any folder currently open in a Windows Explorer menu. In addition, you can select the installation folder for the current application. The shortcut menu also includes an option to remove the active filter from the dialog by forcing "*.*" into the file selection.

I was going to continue development of this script to allow more configuration options (e.g. which hotkey combinations to use) and to support more active window types but to be honest it does everything that I want it to right now. I've scoured the forum and couldn't find anything similar so I hope that this will be useful to someone. Suggest enhancements would be to

Provide support for e.g. Total Commander, Q-Dir etc.

Allow configuration of hotkey combination

Add in support for the common folder browser dialog (this is detected in the script but isn't handled)

This is my first proper script posting so I hope that I've done everything right. I'd appreciate if you let me know what you think as I have a couple more scripts in the pipeline that I'm working on.

Share this post

Link to post

Share on other sites

happy2help 0

This is a great script. I shoved my favorite 10 folders in and i am using it right now!

Any possibility of a menu of your folders when you left-click on the icon? Would be much easier to use when your desktop is full of windows!

When you bring up the settings dialog it would be good for it to select the next empty selection. When i first used it i couldn't figure out why the "explore" button didn't work. (you need to click on one first)

Share this post

Link to post

Share on other sites

happy2help 0

It's now even better!! I had done some tweaking last night before you posted your update and think it will make it better. It's only cosmetic, but looks better. here is the code i changed (only the numbers)

Share this post

Link to post

Share on other sites

ResNullius 5

V0.3.0 Now available. Please see the original post for updates. Of course, I'm really hoping to attract a comment from one of the revered AutoIt "gurus"

Regards,

WBD

Don't know if the revered or guru status applies but I'll throw in my two cents worth anyway...

So far so good.

My favorite feature is the usage in the File Open/Save Dialogs.

Most of my regular file management/navigation duties are carried out using a console based dual-pane file manager, but this could definitely be a help when saving scripts from SciTE to the various category folders & sub-folders I've set up.

One thing I have noticed with Explorer though: if I have it open and then hide the address bar, the hotkey switching will work until I close Explorer then reopen it. Then the hotkeys no longer work unless I show the address bar again. I haven't really looked at your code to see how its handling the Explorer windows, but if it is dependent on the Address bar being visible, then you should add a check to see if it is, and if it isn't then add a prompt to display it when a user activates a hotkey combo in Explorer and/or a preference in your settings to "always display explorer address bar if not visible".

Like I said, my two cents worth, do I get any change back?

Edit: This testing was done on Windows 2000.

Edited February 19, 2009 by ResNullius

Share this post

Link to post

Share on other sites

WideBoyDixon 8

Good point well made! I was assuming the address bar was visible and forgot to even consider that this might not be the case. I've added something in to ensure that it's visible but it will only work on an English OS since it sends [Alt]V[Alt]T[Alt]A to toggle the visibility of the address bar. I'd like to be able to implement CWM_SETPATH but my preferred way of getting a PIDL from a path string is apparently deprecated. Does anyone have code to set the current path for an Explorer window?

Share this post

Link to post

Share on other sites

nfaustin 1

because too much too pressed. I like using hotkeys for fast access.---> Just a suggestion

BTW,

Very nice script.

I appreciate it.

[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post

Link to post

Share on other sites

MilesAhead 22

An easy enhancement would be to set the flag in FileSelectFolder() so that the input line is available. I really hate navigating using that MS BrowseForFolder object. At least if the input line is there, you can "copy as path" from an explorer window or get the path from the address bar and just paste it in.