
To use the script, you simply hit the Ctrl+Alt+H shortcut key sequence while looking at a folder in Windows Explorer and a new command prompt window will open, already set to the same working directory. We've already covered how to open a command prompt window from the context menu, but this method is even simpler.
To create this hotkey for yourself, create a new AutoHotkey script or add the following to your existing script:
#IfWinActive ahk_class CabinetWClass ; for use in explorer.
^!h::
ClipSaved := ClipboardAll
Send !d
Sleep 10
Send ^c
Run, cmd /K "cd `"%clipboard%`""
Clipboard := ClipSaved
ClipSaved =
return
#IfWinActive
Once you've added, saved, and launched the script, you should be able to start using the hotkey immediately. Thanks, Kevin!^!h::
ClipSaved := ClipboardAll
Send !d
Sleep 10
Send ^c
Run, cmd /K "cd `"%clipboard%`""
Clipboard := ClipSaved
ClipSaved =
return
#IfWinActive
For more Windows shortcut goodness, check out how to make Win+E open the folder of your choice, learn how to use Caps Lock for hand-friendly navigation, and see how Taskbar Overlord tweaks the Windows 7 taskbar. Brand new to AutoHotKey and its time-saving ways? Peek at our beginner's guide to learn how to add this script, or write your own.