2008-02-24

Configure Common Places in "File Picker" dialogs (open file, save file, etc.)

If you are using Windows Vista operating system, you probably noticed that, in terms of purpose, the "C:\Documents and Settings\%USERNAME%" directory have replaced "My Documents". Now, for instance, "My Music" or "My Pictures" are now siblings of "My Documents" rather than being its children.

This new data organization is much more coherent and I would like to apply it on my old Windows XP operating system.

But Windows uses a nickname for the folder "My Documents" and whenever you try to go to the parent folder, you actually end up in "My Computer". This means that there is no convenient way to quickly access "C:\Documents and Settings\%USERNAME%" and that you have to browse each time from the root directory. And this is particularly annoying in the "&Open File" and "&Save File" dialog windows :(

Fortunately a little modification to the registry allows you to change your favorite places displayed in the sidebar.




More information about this manipulation can be found on the MSDN at this address: Cutting Edge: Customize Your Open File Dialog -- MSDN Magazine ...

And, below, is a screenshot of the manipulation:





-- Edited 2008-09-22:

I just discovered another way to do this: download "TweakUI" (Power Toys for Windows XP)... much simpler!



2008-01-01

BringBackFromTray: for MinimizeToTray extension users (Firefox or Thunderbird)




The first extension I installed on Firefox was MinimizeToTray. I love it.

Sadly, It's easy to minimize my prefered browser (Ctrl+Shift+M) but there is no keystroke to bring it back from the Tray: I though for a long time about implementing a global hook that would wait for the keyboard shortcut and activate the Firefox window.

My brand new Logitech keyboard provided a much easier solution! This keyboard has special buttons that can be configured to launch the program of my choice. So I wrote the program below (AutoIT language). Feel free to use it. But, as usual, take note that this program is provided without any guarantee:


; static variables
$program_name="Firefox"
$program_path=_
"C:\Program Files\Mozilla Firefox\firefox.exe"

; set AutoIT options
AutoItSetOption("WinTitleMatchMode", 2)

; Get state of the firefox window
; (eg. 21 minimize to tray =  1 + 4 + 16 )
; (eg. 23 minimize = 1 + 2 + 4 + 16 )
$state = WinGetState($program_name)

; not runing ?
; -> launch the program
If Not $state Then
 Run($program_path)
; not visible ?
; -> bring from the tray
ElseIf Not BitAND($state, 2) Then
 WinActivate($program_name)
; visible and active ?
; -> MinimizeToTray
ElseIf BitAND($state, 8) Then
 ControlSend ($program_name, "", ""_
 , "{SHIFTDOWN}{CTRLDOWN}m{CTRLUP}{SHIFTUP}")
; visible but not active ?
; -> activate
Else
 WinActivate($program_name)
 WinWaitActive($program_name)
EndIf

I recommend you have a look into this great tool called AutoIT: it is extremely useful and efficient in a day-to-day basis; and its syntax is very simple (Basic-like).