Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

MButton: Close windows(taskbar+titlebar) & open IE links


  • Please log in to reply
38 replies to this topic
ttrickyy
  • Members
  • 20 posts
  • Last active: Aug 21 2008 03:09 PM
  • Joined: 18 Jun 2008

The taskbar middle click function does not work on vista. I tried fooling around with the code myself with no luck. Any ideas on how to make it work?


I messed around with it for about five minutes and found that if I move the section commented "Close window with titlebar click" under the section titled "Close taskbar program click" it works. I am not sure why, but I really don't mind.


I say that, but it seems to have problems with middle-clicking maximized windows on dual monitors under Vista. I will keep investigating and update with what I find.
ttrickyy

Larkku
  • Guests
  • Last active:
  • Joined: --
Anyone have a clue how to make this work with QTTabBar? Ever since I installed it, I haven't been able to close Windows Explorer windows with this script. :?

Larkku
  • Guests
  • Last active:
  • Joined: --
...from the taskbar, that is. Middle clicking the title bar works as usual.

Larkku
  • Guests
  • Last active:
  • Joined: --
And I'm also posting in the wrong thread, it's another (though similar) script I'm using. I'll get me coat. :oops:

bandittm
  • Members
  • 10 posts
  • Last active: Dec 03 2008 04:09 AM
  • Joined: 18 Nov 2008
Any chance to make it work with Firefox instead of IE? :-)

szekelya
  • Members
  • 13 posts
  • Last active: Mar 22 2010 01:14 PM
  • Joined: 15 Dec 2008
In Vista WM_NCHITTEST_Result will be 2 also if you midclick a taskbar button, so you have to exclude the taskbar from the "Close window with titlebar click" section.

A way to do it is like this:

; Close window with titlebar click
  IfWinNotActive, ahk_class Shell_TrayWnd
{
  If WM_NCHITTEST_Result in 2,3,8,9,20,21 ; in titlebar enclosed area - top of window
    {
    PostMessage, 0x112, 0xF060,,, ahk_id %WindowUnderMouseID% ; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE
    Return
    }
}


hannaxbear
  • Guests
  • Last active:
  • Joined: --
Did anyone get this to work properly in Vista? I tried changing the code to what some other posters in this thread suggested but it doesn't work...

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
evl, your script is fantastic! Thank you.
:D :D :D

BenBenBen
  • Guests
  • Last active:
  • Joined: --
I have an intel laptop: it has an ultra-nav feature for the middle click button, where if you middle click and hold it will scroll you up and down. This is a really great feature, although unfortunately it prevents there from being a "normal" middle click and this script doesn't work, even with this feature of ultra-nav disabled. Thoughts? Thanks! I think this would be a great feature to have!

chessonly
  • Members
  • 36 posts
  • Last active: Apr 13 2018 04:03 AM
  • Joined: 06 Feb 2005
this script works well , but it interferes with other middle mouse button functions of the application powerpro. In powerpro I have set middlemousebutton hold to display a menu. When this script is running that menu doesn't show up.
Any way to fix that ?

Raine
  • Members
  • 4 posts
  • Last active: Jul 10 2009 07:55 PM
  • Joined: 28 May 2009
Can anyone make it so when you mouse down on the titlebar it minimizes?

matej64
  • Guests
  • Last active:
  • Joined: --
It worked great in XP, but ever since I switched to Windows 7, middle-clicking on the task bar brings up the Shut down window.
Any way around that?

  • Guests
  • Last active:
  • Joined: --
Same problem here.

Is there any way around this?

wiedzmin
  • Guests
  • Last active:
  • Joined: --
In Vista/Win7 just add a bit of a delay and Enter for the Close option to be selected in the popup menu:

IfWinActive, ahk_class Shell_TrayWnd 
    { 
    MouseClick, Right, %ClickX%, %ClickY% 
    Sleep, 200 
    Send, c 
	Sleep, 100
	Send, {Enter}
    WinWaitNotActive,  ahk_class Shell_TrayWnd,, 0.5 ; wait for save dialog, etc 
    If ErrorLevel =1 
      Send, !{Tab} 
    Return 
    }


azure
  • Members
  • 1216 posts
  • Last active: Mar 18 2015 09:06 AM
  • Joined: 07 Jun 2007
can anyone modify this to:

1) right click on a specific taskbar button -> close that specific window (abort if a popup is displayed, asking to save, etc) and halt the opening of right click menu
2) right click on the title of a specific window -> close that specific window (abort if a popup is displayed, asking to save, etc) and halt the opening of right click menu
3) left click on the title of a specific window -> toggle between maximize and minimize state of that specific window (unless you left click, hold down the left button and drag, in order to move the window)

thanks!