Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for a feature that will close the window by middle-clicking the window's title. It would be nice if I could do that in Windows 7.

share|improve this question
1  
superuser.com/questions/24149/… –  Ian Boyd Dec 10 '11 at 12:37
    
@IanBoyd Thank you. It is about middle clicking on taskbar not on the title though. –  Nam G VU Dec 10 '11 at 14:03

1 Answer 1

up vote 4 down vote accepted

You could use AutoHotkey. Several years ago, “evl” posted a script that does exactly what you want:

Middle click sends a normal middle click unless:

  • Over the taskbar: Closes the window whose button is under the mouse (aborts if window prompts to save,etc).

  • Over the titlebar of a window: closes the window (can be made more sensitive to specific window areas - see Shimanov's post: http://www.autohotkey.com/forum/viewtopic.php?t=8486).

  • Over an internet explorer class window: Opens a link in a new window (keep holding the button down to switch back to the original window).

You can run it as a script or compile it to be run as a background program.

share|improve this answer
    
I've just tested with my Windows 7 that doing so is to clone the application window as a native feature. It would be nice to add Ctrl key to the script - but I don't know how to change it. Please help –  Nam G VU Aug 2 '12 at 5:13
    
Clone? It works fine for me, so I’m not sure what the problem is. It is written so that it closes a window when you middle-click its taskbar button or its titlebar, and the only other thing is for IE windows; it opens their links in a new window. Is that where you are seeing the “cloning”? In IE or every window? For example, does happen with Notepad? –  Synetech Aug 2 '12 at 14:46
    
You can cut out the IE code by removing the block starting with ; Open IE link in new window as well as the block starting with OpenIELinkInNewWindowSleep:. Also, you can make it only work when Ctrl is held down by changing the first line from MButton:: to ^MButton::. –  Synetech Aug 2 '12 at 14:49
    
My apologise. I did a mistake; instead of testing on a windows, I test on the taskbar. So please ignore my comment. Sorry again! –  Nam G VU Aug 3 '12 at 10:18
    
I've checked your answer as accepted - but autohotkey has a trojan as scanned by virustotal.com virustotal.com/file/… –  Nam G VU Aug 3 '12 at 10:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.