DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Close window with mouse  (Read 8,877 times)

plutokang

  • Participant
  • Joined in 2009
  • *
  • Posts: 3
Close window with mouse
« on: December 11, 2009, 07:11 PM »
Hallo,
one of the functions most used by me is "close window", Alt+F4.
To position the cursor with the mouse to the small X in the right corner takes time,
so I am looking for a faster way.
A great solution would be a click with both, left and right mouse buttons together.

I know there are mouse drivers to support that, but they need a lot of resident memory.
A small program may be the better way. What do you think?
Thanks
Jürgen

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: Close window with mouse
« Reply #1 on: December 11, 2009, 08:14 PM »
A great solution would be a click with both, left and right mouse buttons together.
I know there are mouse drivers to support that, but they need a lot of resident memory.
A small program may be the better way.

Give RockerClose try:  Download (source/binary included)

Make sure the app you want closed is the focused app and then do a "right-click hold then left click" action.  That type of action is called a rocker action.  It's just a simple hotkey so you can easily incorporate it into your main AutoHotkey script if you run one.  Here's the code:

Code: (autoit)
#NoTrayIcon
#NoEnv
#SingleInstance, Force
SetWorkingDir, %A_ScriptDir%
DetectHiddenWindows, On

~RButton & LButton Up::
{
    WinClose, A
}
Return

plutokang

  • Participant
  • Joined in 2009
  • *
  • Posts: 3
Re: Close window with mouse
« Reply #2 on: December 12, 2009, 12:03 PM »
Thank you skwire, super, works very well, that's what I need. Jürgen

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
Re: Close window with mouse
« Reply #3 on: December 12, 2009, 12:09 PM »
plutokang: You might want to try StrokeIt. One of the standard gestures that comes w/ it is drawing a C to close the current active window. You hold your right mouse button down and draw C anywhere on the active window and it gets closed.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: Close window with mouse
« Reply #4 on: December 12, 2009, 12:29 PM »
Thank you skwire, super, works very well, that's what I need. Jürgen

You're welcome.  I'm glad to help.

plutokang

  • Participant
  • Joined in 2009
  • *
  • Posts: 3
Re: Close window with mouse
« Reply #5 on: December 13, 2009, 12:06 PM »
Hallo sri, strokeit is also very good, uses in my system only 188 K Memory.
And can perform a lot of additional functions, thank you.

Original address: https://www.donationcoder.com/forum/index.php?topic=20955.0