Middle Button mouse -> Close window under mouse

Get help with using AutoHotkey and its commands and hotkeys
teosc
Posts: 7
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: 306
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] [Download] GeSHi © Codebox Plus

MButton::
MouseGetPos,,, MouseWin
WinClose, Ahk_id %MouseWin%
Return
teosc
Posts: 7
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] [Download] GeSHi © Codebox Plus

MButton::
MouseGetPos,,, MouseWin
WinClose, Ahk_id %MouseWin%
Return


It works!
Thanks ;)

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Concerned Penguin, DyaTactic, emretoprak, Exaskryz, gregster, pneumatic, Randy31416, Stuff n Things and 26 guests