I found a handy script to toggle desktop icons on and off in Windows 10. It works well except I would like to invoke the script by a double mouse click on the empty area of the desktop and/or taskbar. The spy utility identifies the desktop as ahk_class Progman. The taskbar is identified as ahk_class Shell_TrayWnd. Any suggestions?
Code: Select all
#F11::
ControlGet, HWND, Hwnd,, SysListView321, ahk_class Progman
If HWND =
ControlGet, HWND, Hwnd,, SysListView321, ahk_class WorkerW
If DllCall("IsWindowVisible", UInt, HWND)
WinHide, ahk_id %HWND%
Else
WinShow, ahk_id %HWND%
Return