4 options to change the current folder in Windows Explorer

Get help with using AutoHotkey and its commands and hotkeys
User avatar
JnLlnd
Posts: 268
Joined: 29 Sep 2013, 21:29
GitHub: JnLlnd
Location: Montreal, Quebec, Canada
Contact:

Re: 4 options to change the current folder in Windows Explorer

26 Jul 2017, 15:51

Thanks for the references, jeeswg. I used Navigate2 with an integer parameter (for example 17 = My Computer) but I did not know about object parameters. Interesting.
Author of freeware apps Quick Access Popup (http://www.quickaccesspopup.com),
FoldersPopup and CSV Buddy (http://code.jeanlalonde.ca)
Eureka
Posts: 4
Joined: 03 Apr 2018, 13:31
Location: Netherlands

Re: 4 options to change the current folder in Windows Explor

03 Apr 2018, 13:59

Just registered to say THANK YOU!! for all this fundamental research you all have done.
Very valuable, as I''m writing my first AHK (to navigate to folders using Everything, a very reliable and fast file/folder search utility). This thread helps enormously with that :)

BTW:
JnLlnd wrote:Unfortunately, there does not seem to be a solution to this:

Code: [Select all] [Download] (Script.ahk)GeSHi © Codebox Plus

For pExp in ComObjCreate("Shell.Application").Windows
if (pExp.hwnd = strWinId)
try pExp.Navigate(myPath)

This will fail if myPath includes a hash (# as in C:\C#Projects).

No (longer?) such problems with AHK 1.1.27.07 @ Win10 1709 (both x64)
User avatar
JnLlnd
Posts: 268
Joined: 29 Sep 2013, 21:29
GitHub: JnLlnd
Location: Montreal, Quebec, Canada
Contact:

Re: 4 options to change the current folder in Windows Explorer

03 Apr 2018, 16:44

Hi Eureka,

Please read this post and the following:
https://autohotkey.com/boards/viewtopic ... 199#p25199

For me, it still does not work if there is a slash after the hash. My message and example should have been: "This will fail if myPath includes a hash and has a slash after it (as in C:\C#Projects\)."
Author of freeware apps Quick Access Popup (http://www.quickaccesspopup.com),
FoldersPopup and CSV Buddy (http://code.jeanlalonde.ca)
Eureka
Posts: 4
Joined: 03 Apr 2018, 13:31
Location: Netherlands

Re: 4 options to change the current folder in Windows Explorer

03 Apr 2018, 17:50

JnLlnd wrote:Hi Eureka,

Please read this post and the following:
https://autohotkey.com/boards/viewtopic ... 199#p25199

For me, it still does not work if there is a slash after the hash. My message and example should have been: "This will fail if myPath includes a hash and has a slash after it (as in C:\C#Projects\)."


Ah, I see. Same here ...
That's probably because this method uses the URL syntax. And a hash/pound/number sign has special meaning in that case.
I tried to replace it with it's URL escape character: %23 (*), but in that case the % was replaced by it's URL escape character (%25).
It should be possible to feed a literal % by escaping it in AHK, but I'm not (yet) experienced enough in AHK to get that working.


(*) Drag the foldername to the address bar of your browser to see the converted filename

Return to “Ask For Help”

Who is online

Users browsing this forum: chngrcn and 89 guests