Quote:
Is the script in this thread's first post kept up-to-date?
Yes. I see it's been over a year since any update but I still use it every day as is. The only user updates from this thread I haven't added to it are ones that would have a very limited intrest.
Quote:
The following method I've found seems to work for *most* Windows Explorer windows (without the full path in the title):
Interesting. I'll play with that a bit.
Quote:
This doesn't work in special folders, like My Documents (unless you get there via Documents and Settings)...Anyone know a way around this, besides checking for special cases such as "My Documents"?
This is an often asked question, so i've done some research into it.
What we are after is a way to get Explorer to display a Special Folder, like:
Code:
Run, explorer "My Documents"
Quote:
Special Folders
From Wikipedia
A Special Folder can either be a reference to a physical file system directory, or a reference to a "virtual" folder. In the former case, they are analogous to environment variables — in fact, many of the environment variables that are set in a user's session are defined by where the special folders are set to point to.
Virtual folders, however, do not actually exist on the file system; they are instead presented through Windows Explorer as a tree of folders that the user can navigate. This is known as the Shell namespace.
The My Documents you refere to is a "virtual" folder. It's basically a linked list of items contained in the Shell namespace to display when you click on My Documents. So is My Computer, and the Desktop that lists My Comuter under it.
Do a search for "Shell namespace" to get the details on how Windows does these "Virtual folders".
This ahk thread shows how to get some of the Special Folder values using DllCall, which can then be passed to explorer to open:
http://www.autohotkey.com/forum/topic10325.html&highlight=csidl
But it cannot handle the Virtual folders.
I would think there must be some way to tell explorer to access the CSIDL_MYDOCUMENTS (0x000c) which is the My Documents virtual folder.
Explorer already does this internally, but there seems to be no way of telling it externally to display it.
Maybe someone with a deeper knowledge of the dll functions involved could give us some pointers.