1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > win10/win11快速隐藏/显示桌面图标快捷方式

win10/win11快速隐藏/显示桌面图标快捷方式

时间:2023-02-04 10:00:41

相关推荐

win10/win11快速隐藏/显示桌面图标快捷方式

使用windows系统的时候,桌面有时会变得比较杂乱,想要随时随地很方便的隐藏和显示桌面图标还不是不是一件容易的事情,这里介绍了一个代码,可以很方便地设置快捷方式。

快捷键alt+q隐藏/显示图标,代码如下:

!q::HideOrShowDesktopIcons()returnHideOrShowDesktopIcons(){ControlGet, class, Hwnd,, SysListView321, ahk_class ProgmanIf class =ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerWIf DllCall("IsWindowVisible", UInt,class)WinHide, ahk_id %class%ElseWinShow, ahk_id %class%}

;双击桌面右上角显示隐藏桌面图标#PersistentCoordMode, Pixel, ScreenCoordMode, Mouse, Screen;~ 桌面Progman|WorkerWGroupAdd, Desktop, ahk_class ExploreWClassGroupAdd, Desktop, ahk_class WorkerWWaitTime := DllCall("GetDoubleClickTime")/1000;屏幕左上x1:=0y1:=0;任务栏高度WinGetPos,,,, h,ahk_class Shell_TrayWnd;屏幕右下x2:=A_ScreenWidthy2:=A_ScreenHeight-hOutputDebug %x2%,%y2%#IfWinActive, ahk_group Desktop~LButton::KeyWait,LButtonKeyWait, LButton, d T %WaitTime%+200If ! Errorlevel{MouseGetPos,x,yOutputDebug %x%-%y%;~ if (x<x1+10 and y<y1+10 ) ;屏幕左上角10*10见方。;~ {;~ OutputDebug 左上角;~ HideOrShowDesktopIcons();~ }if (x>x2-10 and y<y1+10 ) ;屏幕右上角10*10见方。{OutputDebug 右上角HideOrShowDesktopIcons()}else if (x<x1+10){OutputDebug 左边;~ Run notepad}else if (y<y1+10){OutputDebug 上边;~ Run notepad}else if(x>x2-10){OutputDebug 右边;~ run calc}else if(y>y2-10){OutputDebug 下边;~ run calc}else{OutputDebug 其它ToolTip %x%-%y%Sleep,1000ToolTip}}returnHideOrShowDesktopIcons(){ControlGet, class, Hwnd,, SysListView321, ahk_class ProgmanIf class =ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerWIf DllCall("IsWindowVisible", UInt,class)WinHide, ahk_id %class%ElseWinShow, ahk_id %class%}

新建一个文本文件,将代码复制进去,再将后缀改为.ahk即可,双击文件,即可实现快捷隐藏/显示桌面图标。可以将该文件放入文件自启动文件夹中,这样可以避免每次打开电脑都要重新双击它。使用win+r键打开运行窗口,输入shell:startup,在打开的文件夹中将此文件放入其中即可。

参考链接:链接

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。