Double Click To Hide/Unhide Desktop Icons

Share your favorite FastKeys commands
Post Reply
burnedstriker
Posts: 7
Joined: Nov 21st, ’18, 16:43

Post by burnedstriker » Nov 21st, ’18, 17:13

I would like a feature or a script. I don't know if this is possible as a feature, hence posting it in this script section.

I would like to execute the double-click to hide and again double-click to unhide icons.

This should work as default on windows startup without executing any commands or typing anything.

Please help me get this possible. I really want this feature to work.

Thank you :)
User avatar
Tom
Posts: 315
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 21st, ’18, 21:17

This script shows/hides desktop icons on double-click on desktop empty space. The main challenge was how to avoid hiding when user double-clicks the icons. This solution works for me on Windows 10.

Shortcut: LButton (enable native option ~)
Type: Command

Code: Select all

If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 350 )
{
	WinGetClass, Class, A
	If Class in Progman,WorkerW
		var:=(hidden=1)?"Show":"Hide"
	ControlGet, Selected, List, Selected, SysListView321, ahk_class %class%
	if selected
		return
	hidden:=!hidden
	Control, %var%,, SysListView321, ahk_class Progman
	Control, %var%,, SysListView321, ahk_class WorkerW
}
Return
burnedstriker
Posts: 7
Joined: Nov 21st, ’18, 16:43

Post by burnedstriker » Nov 22nd, ’18, 07:23

Tom wrote:
Nov 21st, ’18, 21:17
This script shows/hides desktop icons on double-click on desktop empty space. The main challenge was how to avoid hiding when user double-clicks the icons. This solution works for me on Windows 10.

Shortcut: LButton (enable native option ~)
Type: Command

Code: Select all

If ( A_PriorHotKey = A_ThisHotKey && A_TimeSincePriorHotkey < 350 )
{
	WinGetClass, Class, A
	If Class in Progman,WorkerW
		var:=(hidden=1)?"Show":"Hide"
	ControlGet, Selected, List, Selected, SysListView321, ahk_class %class%
	if selected
		return
	hidden:=!hidden
	Control, %var%,, SysListView321, ahk_class Progman
	Control, %var%,, SysListView321, ahk_class WorkerW
}
Return
Thank you so much (extremely grateful).

This is exactly what I wanted the program to do and hoping that others will benefit from this as well.
asrey
Posts: 5
Joined: Nov 29th, ’18, 12:07

Post by asrey » Jan 11th, ’19, 17:55

Hello, the code does not work for me in windows 10. I have everything like this:

https://gyazo.com/db5dd59f0825e88825974ed6f9f5d417

I'm not sure what I should do to make it work. Maybe I did not understand it well. Thank you
burnedstriker
Posts: 7
Joined: Nov 21st, ’18, 16:43

Post by burnedstriker » Jan 11th, ’19, 18:08

asrey wrote:
Jan 11th, ’19, 17:55
Hello, the code does not work for me in windows 10. I have everything like this:

https://gyazo.com/db5dd59f0825e88825974ed6f9f5d417

I'm not sure what I should do to make it work. Maybe I did not understand it well. Thank you
You have used the code to make a text expander, which is wrong.

Go to shortcuts, new, click the ~ button next to the text box and follow the instructions and it should work.

PS: I am using this on Windows 10, so it works for sure!
asrey
Posts: 5
Joined: Nov 29th, ’18, 12:07

Post by asrey » Jan 11th, ’19, 19:20

yes! Works! thank so much for your help! :P
burnedstriker
Posts: 7
Joined: Nov 21st, ’18, 16:43

Post by burnedstriker » Jan 11th, ’19, 19:45

asrey wrote:
Jan 11th, ’19, 19:20
yes! Works! thank so much for your help! :P
Awesome!

Thanks @Tom for the awesome support & script :)
anjelinus
Posts: 1
Joined: Apr 24th, ’19, 15:02

Post by anjelinus » Apr 24th, ’19, 15:06

Genious! :)

Exactly what I was looking for (during presentations for groups...)

Added to Fastkeys (should be a standard hotkey in the software) on W10 and works like a charm.
Post Reply