DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Topic started by: vulture_-g7 on June 04, 2012, 01:09 PM

Title: Single click focus, double click bring to front
Post by: vulture_-g7 on June 04, 2012, 01:09 PM
First of all, hello everyone! :)

I was wondering if it was possible to have a utility that changes the behaviour of windows. As it is, if you click a window it comes to the front and it is focused. I would like to have a behaviour like this: Single click simply gives focus without bringing the window to front, double click gives focus to the window and also brings it to front. Any chance that could be created? Thx!
Title: Re: Single click focus, double click bring to front
Post by: bendecker on October 01, 2012, 04:36 PM
I would also VERY much like to have a utility like this!

The ability to click once for focus, twice to bring the focused window to the front was a favorite feature of mine on the Commodore Amiga. It's wonderful! Now, here it is, over 20 years later and that great feature has not yet made it to the Windows world. I would gladly make a donation to anyone who has the know-how to code this gem.

Thank you!

   -Ben
Title: Re: Single click focus, double click bring to front
Post by: Ath on October 01, 2012, 05:12 PM
For what purpose do you want the Window to get focus? Mouse-wheel scrolling ?
Title: Re: Single click focus, double click bring to front
Post by: bendecker on October 01, 2012, 11:19 PM
To be clear, the window in back is partially visible behind the window in front (as in not completely covered).  The most important thing is, I want to be able to copy information either to or from that window. However, in short, I would like it to do everything a front window does, but without forcing itself to the front. Right now, as soon as a partially covered window is clicked on, it becomes active and jumps to the front, covering the window that is most important for me in doing my work. I hope this makes sense.

   -Ben
Title: Re: Single click focus, double click bring to front
Post by: AndyM on October 01, 2012, 11:54 PM
... covering the window that is most important for me in doing my work
Why not simply make the "most important window" Always On Top"? 
Title: Re: Single click focus, double click bring to front
Post by: bendecker on October 02, 2012, 09:19 AM
Is there a simple way to do that in windows XP? Im not aware of one.
Title: Re: Single click focus, double click bring to front
Post by: AndyM on October 02, 2012, 09:58 AM
Nothing built in that I know of, but most all macro/scripting/filemanager utilities include the ability to keep a window on top regardless of focus.

I use AutoHotkey and MacroExpress for stuff like this, one is usually easier than the other for any particular thing.  In this case I use MacroExpress for keyboard shortcuts and mouse shortcuts that turn AlwaysOnTop on and off, pretty much one-line macros.

There's an AutoHotkey command that will do this.  You could easily assign turning this on or off for the focused window with two hotkeys.  A toggle using only one hotkey would take an extra few lines of code - you'd have to check the status of the current window and then reverse it.  If instead of a keyboard shortcut you want a mouse click on a window part, that's so easy in Macro Express that I never learned how to do that in AutoHotkey.
Title: Re: Single click focus, double click bring to front
Post by: MilesAhead on October 02, 2012, 10:26 AM
I have a free one.  See Topmost Toggle on my Hotkeys Page (http://www.favessoft.com/hotkeys.html)

Activate a window by clicking normally on it, if it's not active already. Then hotkey on the window to toggle the Topmost attribute. A tooltip pops up quickly to show the current state after you hotkey. It also has a couple of other window functions. See About Box for usage.
Title: Re: Single click focus, double click bring to front
Post by: AndyM on October 02, 2012, 10:52 AM
There you go, Topmost Toggle should do the trick.
Title: Re: Single click focus, double click bring to front
Post by: tomos on October 02, 2012, 11:38 AM
you might be aware of katmouse -
I used use it in XP to scroll windows that dont have focus. I *think* it also *might* have had an option to keep window on top (I know I had that option on xp but not sure how).
I'd recommend Katmouse anyways ;) :)

http://ehiti.de/katmouse/

For what purpose do you want the Window to get focus? Mouse-wheel scrolling ?
Title: Re: Single click focus, double click bring to front
Post by: bendecker on October 02, 2012, 01:44 PM
TopmostToggle definitely helps. Thanks for the tip!

The single-click to focus, double click to front from the Amiga would fit my needs better (you can set up just how you want the various windows, then bounce around easily between multiples moving them forwards and back), but this is still a big step forward. I'll give Katmouse a look shortly as well. Thanks, again.
Title: Re: Single click focus, double click bring to front
Post by: MilesAhead on October 02, 2012, 02:18 PM
For Windows, WinSize2 (http://www.portablefreeware.com/index.php?id=2288) may be worth a look. In addition to placement, there are some other bells and whistles.
Title: Re: Single click focus, double click bring to front
Post by: MilesAhead on October 02, 2012, 02:38 PM
I'm not certain they are talking about the same thing here (http://pookey.co.uk/wordpress/archives/167-hover-to-focus-in-windows-7)

Seems like hover the mouse instead of single click. I would recommend backing up the registry before making changes of course. :)
Title: Re: Single click focus, double click bring to front
Post by: bendecker on October 08, 2012, 04:26 PM
After giving them a try, I'd prefer a utility that does the original request:

   1. Single Click makes a window active, but does not bring it to the front

   2. Double Click makes a window active and brings it to the front.

Anyone up for a project? :-)

   -Ben
Title: Re: Single click focus, double click bring to front
Post by: bendecker on November 03, 2012, 06:05 PM
Anyone...? Anyone...? Is there a technical reason as to why this is difficult? I'm happy to pay someone who knows what he/she is doing to code this utility.

Anyone...?
Title: Re: Single click focus, double click bring to front
Post by: Tinman57 on November 03, 2012, 06:31 PM
Anyone...? Anyone...? Is there a technical reason as to why this is difficult? I'm happy to pay someone who knows what he/she is doing to code this utility.

Anyone...?

  I'm not positive, but I remember seeing an app on either PCWorld.com or ZDnet that does exactly what you are talking about.


  BTW, I still have my old Amiga 500 in the closet, still in the original box.  lol
Title: Re: Single click focus, double click bring to front
Post by: bendecker on November 03, 2012, 08:17 PM
I've searched high and low for one unsuccessfully. If you can find the name of the app, I would really appreciate it!

Or... anyone want to code it? Please? :)
Title: Re: Single click focus, double click bring to front
Post by: skwire on November 03, 2012, 10:12 PM
Is there a technical reason as to why this is difficult?

Yes, actually, there is.  What you want, at its most basic, is easy to code.  What I mean is that it's fairly trivial to make single and double-clicking do what you request.  The hard part is not affecting all the other things that single and double-clicking already do in Window, e.g., selecting files, opening apps, single/double clicking titlebars, etc.  Does that make sense?
Title: Re: Single click focus, double click bring to front
Post by: cmpm on November 04, 2012, 06:58 AM
Wizmouse will do this-

1. Hover makes a window active, but does not bring it to the front

2. Single Click makes a window active and brings it to the front.

And it will enable scrolling on inactive windows when hovering.

http://antibody-software.com/web/software/software/wizmouse-makes-your-mouse-wheel-work-on-the-window-under-the-mouse/

edit-
click the 'zip' to download, save yourself unwanted trouble

Title: Re: Single click focus, double click bring to front
Post by: tomos on November 04, 2012, 10:40 AM
Wizmouse works the same as Katmouse (I think Katmouse can have problems on win7).
I presume the advantage of the original request is that you could e.g. open a file from a window even while it is not on top.

Neither Wizmouse nor Katmouse allow that kind of thing.

Title: Re: Single click focus, double click bring to front
Post by: tomos on November 04, 2012, 10:42 AM
Is there a technical reason as to why this is difficult?

Yes, actually, there is.  What you want, at its most basic, is easy to code.  What I mean is that it's fairly trivial to make single and double-clicking do what you request.  The hard part is not affecting all the other things that single and double-clicking already do in Window, e.g., selecting files, opening apps, single/double clicking titlebars, etc.  Does that make sense?

Would it be possible if, instead of single and double clicks, you used e.g.
single-click and control click -
or
giving both clicks qualifier keys
?
Title: Re: Single click focus, double click bring to front
Post by: Ath on November 04, 2012, 11:44 AM
Hm, still the same limitations imposed by Windows apply: A window that has focus is the top-most Window, unless other windows having the 'Always on top' attribute are covering it.

So, AFAICS, the only way of achieving your goal will be playing with that on-top attribute of all other windows covering the intended window. Hm, still sounds dodgy.
And I still don't understand the use-case either :huh:

(I think Katmouse can have problems on win7)
I've been using KatMouse on Win7 x64 for as long as I run that (3 years and a bit now), and I use 1 or 2 apps that have specific mouse-handling that don't like KatMouse, so I excluded them, but it works like a charm for the rest of the system & applications.
Title: Re: Single click focus, double click bring to front
Post by: Tinman57 on November 04, 2012, 08:04 PM
I've searched high and low for one unsuccessfully. If you can find the name of the app, I would really appreciate it!

Or... anyone want to code it? Please? :)

  I just went to PCWorld to look for that file.  Imagine my surprise when I found that PCWorld did away with their downloads!  I've been using PCW services since the W-95 days, looks like I'm going to have to find other sites now.  It's a shame.....  Probably afraid they're going to get sued with all these take-down notices crap....
Title: Re: Single click focus, double click bring to front
Post by: vulture_-g7 on December 14, 2012, 10:52 AM
So, I thought I'd check my request after some time and I'm surprised others want it too :) Not surprised they're coming from the amigaland as I am :p So, how about my original request, but on will ie pressing a hotkey to toggle this kind of behaviour - I believe that'd solve any problem, what do you think guys?
Title: Re: Single click focus, double click bring to front
Post by: bendecker on May 23, 2013, 10:16 AM
Still looking for someone to code this. Anyone...? Is it really THAT hard on Windows? I am more than willing to pay someone for their time to make this happen. Thanks!

    -Ben
Title: Re: Single click focus, double click bring to front
Post by: cmpm on August 24, 2013, 11:24 PM
You might want to try XMouse

http://www.highrez.co.uk/downloads/XMouseButtonControl.htm

Take a look at all the options and settings, maybe there is a combination that will work for you.

I use it mainly to make my middle single click 'browser refresh' along with (optionally) left click 'browser forward' and right click 'browser back'.
I have these settings in what is called "Layers" that can be switched from default to at least 5 more layers with different mouse click settings that can be changed from the tray.
Title: Re: Single click focus, double click bring to front
Post by: cmpm on August 24, 2013, 11:37 PM
NOTE: If you make a mistake in your mouse button configuration, you can disable X-Mouse
Button Control by right clicking the icon in the system tray and selecting Disable from the
menu. You can also, if configured, use the scroll lock key or a global hotkey.

very important! :)

and it's easier to fix if you set the tray icon to always visible
I have lost my default left click function in a "layer" setting and forgot about that note.