Monday, January 04, 2010

Autohotkey Eases Command Prompt Navigation

You're looking at a folder with Windows Explorer. Can you click in the path (which means windows will now select it) and hit a hotkey combo to open a Command Prompt window ready at that path?

With Autohotkey, yes.

(without AHK, it's this incredibly complex procedure)

But, we're saved :

Windows 2K :

#c::
Send ^c ; copy the text
CoordMode, Mouse, Relative
Run cmd.exe
WinWaitActive,cmd,,0.5
Send cd{Space}
Click right 110,70
Send {Enter}
CoordMode, Mouse
Return

Windows XP :

#c::
Send ^c ; copy the text
CoordMode, Mouse, Relative
Run cmd.exe
WinWaitActive,cmd,,0.5
Send cd{Space}
Click right 110,70
Send {Down}{Down}{Down}
Send {Enter}{Enter}
CoordMode, Mouse
Return

It's not pretty:) but it works. Sure, there's more than one way to do it.

No comments: