DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: spunch on May 26, 2006, 10:26 AM

Title: IDEA: Middle click to close windows in taskbar
Post by: spunch on May 26, 2006, 10:26 AM
I tend to have a lot of windows and programs opened at any given time. I am lazy and I usually don't bother closing windows when I'm done working on them. This makes my taskbar appear messy and difficult to navigate through.

The windows taskbar is not very good at letting you close windows easily. It would be nice to be able to close windows on the taskbar with a mere click. A middle click. That's how you close tabs in firefox, I guess I got used to it and would like to see it applied to the taskbar.

:Thmbsup:
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: Martin on May 26, 2006, 10:29 AM
I second that as an awsome idea!
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: AndyM on May 26, 2006, 12:04 PM
Good idea!  (I have Donation Credits burning a hole in my virtual pocket...)
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: Carol Haynes on May 26, 2006, 12:30 PM
That's how you close tabs in firefox, I guess I got used to it and would like to see it applied to the taskbar.

Strange - my mouse doesn't do that. Must be different drivers. Middle click on Firefox tabs has no effect, middle click elsewhere cycles though open apps (which I find quite useful). I'm using an MS IntelliMouse Explorer optical.
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: jgpaiva on May 26, 2006, 12:37 PM
@ Carol: That might be installed extensions-related. I have the default install, and it works here (although, i don't have the mouse you have).
In opera, it also works like that, and makes much sense.

I've been a big fan of bblean (http://bb4win.sourceforge.net/bblean/), which is an alternative shell for windows based in linux's blackbox (and a great shell, BTW ;) ), and features the exact idea you're asking for. It was great, and one of the things i most looked for when i got back to using explorer. But unfortunatelly, i couldn't find it.
Let's see if someone can do it :)
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: JavaJones on May 26, 2006, 02:28 PM
After using Opera and FF I too thought of this idea. However I thought it might be a bit too easy to accidentally close things. I think it's worth coding it up to see how well it would work, but the accidental closing of useful windows does concern me. In a browser, especially Opera, I can just use the "undo"/history button and it can easily re-open a window with just about everything I was doing (including previously visited pages). That would be a lot harder to do with applications. Of course with any application that had unsaved data it would surely send up the normal "do you want to save before exiting?" prompt, so it couldn't be *too* dangerous.

- Oshyan
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: spunch on May 29, 2006, 08:17 PM
Being the great idea that it is, maybe someone should tackle this.
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: imtrobin on May 30, 2006, 01:25 AM
http://dm2.sourceforge.net/
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: skrommel on May 30, 2006, 03:09 AM
 :) Here's a script for you to try the effect.

Skrommel

;MiddleToClose.ahk
; MiddleClick a taskbar button to close it
; To run, save to file MiddleToClose.ahk
; and download and install AutoHotkey from www.autohotkey.com
;Skrommel @2006

#SingleInstance,Force
SetWinDelay,0

enabled=0

Loop
{
  Sleep,50
  oldwinid:=winid
  oldctrl:=ctrl
  MouseGetPos,x,y,winid,ctrl
  WinGetClass,class,ahk_id %winid%
  If (class<>"Shell_TrayWnd")
    lastwinid:=oldwinid
  If (class="Shell_TrayWnd" And ctrl="ToolbarWindow322" And enabled=0)
  {
    Hotkey,MButton,CLOSE,On
    WinActivate,ahk_id %winid%
    enabled=1
  }
 
  If ((class<>"Shell_TrayWnd" Or ctrl<>"ToolbarWindow322") And enabled=1)
  {
    Hotkey,MButton,CLOSE,Off
    WinActivate,ahk_id %lastwinid%
    enabled=0
  }
}

CLOSE:
Send,{LButton}
WinWaitNotActive,ahk_class Shell_TrayWnd,,1
If ErrorLevel=1
  Return
Send,!{F4}
Return
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: spunch on June 03, 2006, 05:45 PM
It doesn't work.
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: AndyM on June 03, 2006, 06:49 PM
I tried it quickly the other day and couldn't get it to work either, but I thought it might have something to do with the configuration of my scroll wheel/middle button.

So I fooled with the configuration, but still nothing happens when I middle click a taskbar button.
Title: Re: IDEA: Middle click to close windows in taskbar
Post by: AndyM on July 25, 2006, 08:45 AM
I stumbled across this:

http://www.autohotkey.com/forum/viewtopic.php?p=50920 (http://www.autohotkey.com/forum/viewtopic.php?p=50920)

I commented out the titlebar middleclick options because all I was interested in was closing a window by middle clicking on its taskbar button.  Seems to work ok so far.