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.
Asked
Active
Viewed 884 times
2
-
2http://superuser.com/questions/24149/closing-programs-with-middle-click-in-windows-7 – 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
-
Does this answer your question? [Closing programs with middle-click in windows 7](https://superuser.com/questions/24149/closing-programs-with-middle-click-in-windows-7) – T.Todua Dec 23 '19 at 09:52
1 Answers
4
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.
Synetech
- 68,243
- 36
- 223
- 356
-
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 02 '12 at 05: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 02 '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 02 '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 03 '12 at 10:18
-
I've checked your answer as accepted - but `autohotkey` has a trojan as scanned by virustotal.com https://www.virustotal.com/file/4311c3e7c29ed2d67f415138360210bc2f55ff78758b20b003b91d775ee207b9/analysis/ – Nam G VU Aug 03 '12 at 10:21
-
@NamG.VU, it shouldn’t. Where did you get it from? I just checked the (portable) copy I have from the [official page](http://www.autohotkey.com/download/) and [it is clean](https://www.virustotal.com/file/de2690282ceadbfd098d54c6dec9f8e810b4435816dbea56d9c99d3aad2c3ec8/analysis/). – Synetech Aug 03 '12 at 16:58
-
I get it from the link you given in you answer going to http://www.autohotkey.com/ and hit download which will lead to http://www.autohotkey.com/download/AutoHotkeyInstall.exe – Nam G VU Aug 09 '12 at 07:40
-
Except for a single false positive, that’s [clean too](https://www.virustotal.com/file/4311c3e7c29ed2d67f415138360210bc2f55ff78758b20b003b91d775ee207b9/analysis/). If you’re extra paranoid about the installer, you can get the [portable version](http://www.autohotkey.com/download/AutoHotkey.zip) instead which is [completely clean](https://www.virustotal.com/file/de2690282ceadbfd098d54c6dec9f8e810b4435816dbea56d9c99d3aad2c3ec8/analysis/). – Synetech Aug 09 '12 at 15:52
-
Just raise the scan result to notice us about it. The tool is cool. I'll go for the mobile version then. Thanks again Synetech – Nam G VU Aug 10 '12 at 02:08