Advertisement
Guest User

Taskbar Quick Close AutoHotkey Script

a guest
Jun 16th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Taskbar Quick Close
  2. ; Quick closing windows from the taskbar with Middle-click.
  3. ; Ctrl + Middle-click for original action (new window)
  4. ShouldActivateMButton() {
  5.   MouseGetPos, xpos, ypos, , ControlUnderMouse
  6.   return ControlUnderMouse = "MSTaskListWClass1"
  7. }
  8.  
  9. #If ShouldActivateMButton()
  10. ; Control + Middle-click does the middle-click action (new window)
  11. ^MButton::MButton
  12. ; Middle-click to close, for quicker one-handed use
  13. MButton::
  14.   MouseClick, Right
  15.   Sleep, 200
  16.   Send, {Tab}{End}
  17.   Send, {Enter}
  18.   return
  19. #If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement