Hide Desktop Icon[AutoHotKey]

Update

/* Library:
 *      Hide Desktop Icon
 * Description:
 *      Hide the desktop icon by double clicking the right mouse button
 * Warnning:
 *      None.
 * Version:
 *      v1.0.5
 * Author:
 *      泠音
 */

intInterval:=300
~RButton::
    If(A_PriorHotkey <> "~RBUtton" or A_TimeSincePriorHotkey > intInterval){
        KeyWait, RButton
        return
    }
If(check()){
    HideOrShowDesktopIcons()
    Sleep, 40
    Send, {Esc}
    return
}

check(){
    MouseGetPos,X,Y,ID,CLASS
    return CLASS=="SysListView321" 
        or CLASS=="SHELLDLL_DefView1"
        or CLASS==""
        or WinExist("ahk_class WorkerW" . " ahk_id " . CLASS)
}

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%
}

泠音
63 声望3 粉丝

想象一座飘着朦胧烟雨的村庄,怎么才能走进她的心里。


引用和评论

0 条评论