Skip to content

Instantly share code, notes, and snippets.

@akaleeroy
Created July 7, 2018 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akaleeroy/b5b84989f7ee637251731028c64aefd2 to your computer and use it in GitHub Desktop.
Save akaleeroy/b5b84989f7ee637251731028c64aefd2 to your computer and use it in GitHub Desktop.
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