介绍
此脚本可以通过热键切换桌面图标的显示。
实际上我很少使用它,最初我是想实现一种曲线给应用设置壁纸的效果,就是降低应用透明度,同时隐藏桌面图标……
不过现在已经废弃了,或许对有些小伙伴会有些帮助。
那时我还在使用ahk的L版,不过现在我已经全面向ahk2转入了,所以重新写了个ahk2版的脚本,各取所需。
脚本
用于AHKv2
!q::
{
; 获取FolderView的id
HWorkerW := WinGetID("ahk_class WorkerW")
HDefView := DllCall("FindWindowEx", "UInt", HWorkerW, "UInt", 0, "Str", "SHELLDLL_DefView", "UInt", 0)
HListView := DllCall("FindWindowEx", "UInt", HDefView, "UInt", 0, "Str", "SysListView32", "UInt", 0)
; 检查显隐状态
if DllCall("IsWindowVisible", "UInt", HListView) {
DllCall("ShowWindow", "UInt", HListView, "UInt", 0)
}
else {
DllCall("ShowWindow", "UInt", HListView, "UInt", 5)
}
}
用于AHKvL(转载)
!q::
{
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%
}