Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Taskbar Quick Close
; Taskbar Quick Close
; Quick closing windows from the taskbar with Middle-click.
; Ctrl + Middle-click for original action (new window)
#If ShouldActivateMButton()
; Control + Middle-click does the middle-click action (new window)
^MButton::MButton
; Middle-click to close, for quicker one-handed use
MButton::
MouseClick, Right
Sleep, 200
Send, {Tab}{End}
Send, {Enter}
Return
#If
ShouldActivateMButton() {
MouseGetPos, xpos, ypos, , ControlUnderMouse
return ControlUnderMouse = "MSTaskListWClass1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.