Here's an option that allows searching by the menu position number.
Create a User Command:
Create a ShortCut: Ctrl + D that is assigned to em_TCFavMenuem_TCFavMenu
Command: "C:\Program Files\AutoHotKey\AutoHotKey.exe" "C:\Path\to\the\script\TC_DirHotList.ahk"
Usage:
KEYPAD KEYS:
+:: Select
. :: Select
- :: Left
/ :: Up
* :: Down
Enter :: Enter
Other KEYS:
/ or \ :: Select
Enter :: Enter
Left/Right/Up/Down ArrowKeys as Normal.
ESC :: ESC
- Browse HotList with ArrowKeys and Enter(s) as usual.
- Any letter input will be passed to the HotList menu and the script will exit.
- When you enter a number, Press Enter or one of the "Select" Keys.
- Pressing a "Select" Key twice in succession, is the same as Enter.
If your "Docs" is the 4th item in your DirMenu/FavMenu
- --> Press: "4 Enter" to Open that Directory
- --> 4+ (or 4. etc) to select the Menu
- --> Press: "2 Enter 2 Enter" _OR_ "2+2++", OR 2+2 Enter, etc.
- Press any Select Key as the very First Key.
e.g. +4+ OR .4.. OR +4 ENTER, etc
Code: Select all
;;
;; Script: TC_DirHotList.ahk v1.75
;;
;; Author: Balderstrom, Sept.2010
;;
;; Usage: Browse TC's DirHotList by menu# position.
;; Open a NewTab if NumpadADD DOT, ./ or \ is pressed before a Number.
;;
;;
#SingleInstance, Force
#NoEnv
SetBatchLines, -1
TC_DirHotList()
return
TC_DirHotList()
{
GLOBAL GLOBAL_ERROR, CLICK_DOWN, GLOBAL_SEND
WinWaitActive, ahk_class TTOTAL_CMD
PostMessage, 0x433, 526, 0,, A ; cm_DirectoryHotlist
WinWait, ahk_class #32768
SetTimer, CheckERROR, 200
FirstInput := TRUE
iStrParseAgain:
Input, iStr,,\+/.{NumpadDot}{NumpadAdd}{Enter}{NumpadEnter}{Escape}{Up}{NumpadDiv}{Down}{NumpadMult}{Left}{NumpadSub}{Right}
RegExMatch(ErrorLevel, "EndKey:(.*)", rStr )
if( rStr1 == "Escape" && GLOBAL_ERROR := "Escape" )
return
if( iStr && !RegExMatch(iStr, "^\d+$") && GLOBAL_ERROR := "ExitNow" && GLOBAL_SEND := iStr )
return
if( iStr )
{
PostMessage, 0x1ed, % iStr - 1
FirstInput := FALSE
CLICK_DOWN := TRUE
iStrLast := iStr
}
if( rStr1 && RegExMatch(rStr1, "(\/|\\|\+|NumpadAdd|\.|NumPadDot)") && rStr1 := "" )
{
if( !FirstInput )
{
if( iStrLast && !(CLICK_DOWN:=FALSE) )
PostMessage, 0x1ef, % iStrLast - 1
else
Send, {Enter}
iStrLast := 0
}
else ;; If + . / or \ is the very first key.
{ ;; Then create a new Tab.
SetTimer, CheckERROR, OFF
Send, {Esc}
WinWaitClose, ahk_class #32768
Send, ^t ; New Tab
PostMessage, 0x433, 526, 0,, A ; cm_DirectoryHotlist
WinWait, ahk_class #32768
SetTimer, CheckError, 200
}
}
if( rStr1 )
{
rStr1 := ( rStr1 == "NumpadSub" ? "Left" : rStr1 == "NumpadDiv" ? "Up" : rStr1 == "NumpadMult" ? "Down" : rStr1 )
if( iStrLast && !(CLICK_DOWN:=FALSE) )
PostMessage, 0x1ef, % ( InStr(rStr1, "Enter") ? iStrLast : 0 ) - 1
else
Send, % "{" rStr1 "}"
iStrLast:=0
}
FirstInput := FALSE
Goto, iStrParseAgain
}
CheckERROR:
if( GLOBAL_ERROR == "ExitNow" )
Goto, ExitApp
if( GLOBAL_ERROR == "Escape" )
{
SetTimer, CheckERROR, OFF
Send, {Escape}
ToolTip, % "TC_FavMenu :: Cancelled.",,,20
Sleep, 1000
Tooltip,,,,20
}
ifWinExist, ahk_class #32768
return
ExitApp:
Send, % ( GLOBAL_SEND ? GLOBAL_SEND : "" )
if( CLICK_DOWN )
PostMessage, 0x1ef, -1
ExitApp
† SideBar Note:
Menu Output (mentioned above), when you have SubMenu's
Code: Select all
0 : -1 AppData
0 : 16003 AppData
1 : 16004 OpSessions
2 : 16005 OpCache
1 : -1 $_APPS_$
0 : 16008 F_TCMD
1 : -1 1. Junk
0 : 16010 1. Test
1 : 16011 cm_Return
2 : 16014 exCMD
3 : 16015 isBin
4 : 16016 TWinKey
5 : 16017 FOO
6 : 16018 wdx
7 : 16019 emFoo
8 : 16020 _AUDIO_
9 : 0 ---------------------------------------
10 : 16000 &Add current dir
11 : 16001 &Configure...