On Windows 10 by AutoHotkey rapid hide / show the desktop icons to switch virtual desktops

Here Insert Picture Description
When you want to use multiple desktops need to press ctrl+Windows+左右键think a lot of trouble how to do?

Download AutoHotkey

Add the following script editor

~LControl & WheelUp::
Send {LWin Down}{Ctrl Down}{Left}{Ctrl Up}{LWin Up}
return
~LControl & WheelDown::
Send {LWin Down}{Ctrl Down}{Right}{Ctrl Up}{LWin Up}
return

This 左Ctrl+鼠标滚轮can be realized切换桌面

Quickly hide desktop icons

Add to

!q::
HideOrShowDesktopIcons()
return
 
HideOrShowDesktopIcons()
{
	ControlGet, class, Hwnd,, SysListView321, ahk_class Progman
	If class =
		ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerW
 
	If DllCall("IsWindowVisible", UInt,class)
		WinHide, ahk_id %class%
	Else
		WinShow, ahk_id %class%
}

alt+q Fast hide icons

How to create a script

Here Insert Picture Description

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

~LControl & WheelUp::
Send {LWin Down}{Ctrl Down}{Left}{Ctrl Up}{LWin Up}
return
~LControl & WheelDown::
Send {LWin Down}{Ctrl Down}{Right}{Ctrl Up}{LWin Up}
return

!q::
HideOrShowDesktopIcons()
return
 
HideOrShowDesktopIcons()
{
	ControlGet, class, Hwnd,, SysListView321, ahk_class Progman
	If class =
		ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerW
 
	If DllCall("IsWindowVisible", UInt,class)
		WinHide, ahk_id %class%
	Else
		WinShow, ahk_id %class%
}

Add all the above functions can be realized

Add the script to the startup can boot from Kai.

Published 126 original articles · won praise 35 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_43442524/article/details/103744613