Page 1 of 1

WindowSpy - Minimize instead of closing window

Posted: 30 Mar 2018, 16:07
by divanebaba
Hi.

Much too often, I click onto close instead of desired minimizing.
Some programs have options to choose "Minimize instead of closing".

It would be a great advantage for careless user like me, implementing such a option to WindowSpy.

Thanks

For example, like below:
winspy.jpg
winspy.jpg (29.29 KiB) Viewed 2859 times

Re: WindowSpy - Minimize instead of closing window

Posted: 31 Mar 2018, 01:43
by lexikos
Why don't you just assign it to a hotkey?

Re: WindowSpy - Minimize instead of closing window

Posted: 31 Mar 2018, 09:26
by jeeswg
You could edit WindowSpy.ahk. (You might want to comment out #NoTrayIcon if you did this, to have access to the 'Exit' menu item.)

Code: Select all

;replace:
GuiClose:
ExitApp

;with:
GuiClose:
WinMinimize, % "ahk_id " hGui
return

Re: WindowSpy - Minimize instead of closing window

Posted: 31 Mar 2018, 15:43
by divanebaba
As Window Spy is loaded very quick and modification is easy and already shown, both suggestions seem making more sense than my wish. :crazy:

@lexikos - Using a hotkey is best workaround, but it causes additionally checking "Follow mouse" everytime WinSpy is started.
(I'm flattered to be addressed personally by the chief developer.)

@jeeswg - It was not unknown for me, that the modification is just a little step for the developers.
I had my eyes on the benefits for the users.
Official modification makes collecting and maintaining needless.
(I like your posts, even if most of them are much too complicated for me.)

I'm not 250% sure, but using left mouse-click more carefully seems best option for now and for me. :mrgreen: :mrgreen:

Re: WindowSpy - Minimize instead of closing window

Posted: 31 Mar 2018, 20:01
by lexikos
Using a hotkey is best workaround,
Forget workarounds; using a hotkey to open the tool regardless of whether it was already running is more efficient than opening it via Explorer or the tray icon and keeping it minimized.
but it causes additionally checking "Follow mouse" everytime WinSpy is started.

Code: Select all

Control Check,, Follow Mouse, Window Spy

Re: WindowSpy - Minimize instead of closing window

Posted: 01 Apr 2018, 13:31
by divanebaba
Ok, you convinced me.
I chose a hotkey - modifying WindowSpy is as good but I want to avoid checking if newer versions of WindowSpy are present or not.

Code: Select all

Alt & w::
if WinExist("Window Spy" "ahk_class AutoHotkeyGUI")
	winactivate
else
{
	run C:\Program Files\AutoHotkey\WindowSpy.ahk
	sleep 300
	Control, check,, Follow Mouse, Window Spy
}
return
Thanks and happy Easter.

EDIT: added "ahk_class AutoHotkeyGUI", because without this, WinExist(...) can catch any window with "Window Spy" in its title.