Middle Button mouse -> Close window under mouse

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
teosc
Posts: 54
Joined: 17 Jun 2017, 04:56

Middle Button mouse -> Close window under mouse

19 Jun 2017, 02:17

Hi guys, I tried but found only examples with click on the title bar.

In a script I want to add the function:
Middle Button mouse -> Close window under mouse (also if this is not active)

How can I do?

I'm a total noob, thank you very much.
Sorry for my bad english.
Rohwedder
Posts: 7622
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Middle Button mouse -> Close window under mouse

19 Jun 2017, 07:05

Hallo,
try:

Code: Select all

MButton::
MouseGetPos,,, MouseWin
WinClose, Ahk_id %MouseWin%
Return
teosc
Posts: 54
Joined: 17 Jun 2017, 04:56

Re: Middle Button mouse -> Close window under mouse

19 Jun 2017, 08:00

Rohwedder wrote:Hallo,
try:

Code: Select all

MButton::
MouseGetPos,,, MouseWin
WinClose, Ahk_id %MouseWin%
Return
It works!
Thanks ;)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], vikasgandhi and 327 guests