0
votes

In Windows 10, you can use WinKey + 1 to select the first pinned item in the taskbar, so on upto WinKey+0, which selects the 10th item pinned to the taskbar.

On my keyboard, immediately to the right of 0 is the hyphen/minus key (-) .

I would like to write a autohotkey script that , when WinKey and the minus key are simultaneously pressed, it acts like the equivalent of WinKey + {1 .. through .. 0 }, but for the 11th pinned item in my taskbar. (and preferably WinKey + = to toggle the 12th item pinned)

Any idea how I would do that? Does AutoHotKey have an API to track the "11th" item in a taskbar?

1
AHK doesn't have a specific API for that, I don't know if it's possible without clicks. - D. Pardal

1 Answers

0
votes

I came up with this. Doesn't minimize the window if it's not minimized.

For AutoHotkey v2:

#-::
WinActivate "ahk_class Shell_TrayWnd ahk_exe Explorer.EXE"
Send "{Tab}{Right 10}{Enter}"
Return

For AutoHotkey v1:

#-::
WinActivate ahk_class Shell_TrayWnd ahk_exe Explorer.EXE
Send {Tab}{Right 10}{Enter}
Return