代码如下,需自行修改第三十行的壁纸路径:
blackback:=0
Return
;Ctrl+d 将当前窗口设置为桌面的子窗口(置底)
^d::
WinSet:=AlwaysAtBottom(WinExist("A"))
return
;http://www.autohotkey.com/board/topic/80573-how-to-set-a-gui-to-be-always-at-bottom/
AlwaysAtBottom(Child_ID)
{
WinGet, Desktop_ID, ID, ahk_class WorkerW
Return DllCall("SetParent", "uint", Child_ID, "uint", Desktop_ID)
}
;Ctrl+b 恢复原状
^b::
WinSet:=undoAlwaysAtBottom(WinExist("A"))
return
undoAlwaysAtBottom(Child_ID)
{
Return DllCall("User32\SetParent", "Ptr",Child_ID, "Ptr",0)
}
$#d::
if ! blackback
DllCall("SystemParametersInfo",UInt,0x14,UInt,0,Str,"",UInt,1)
else
DllCall("SystemParametersInfo",UInt,0x14,UInt,0,Str,"C:\Users\Dugeng\Pictures\壁纸\优雅.jpg",UInt,1)
SendInput,#d
blackback:=! blackback
Return
GuiClose:
GuiEscape:
ExitApp
Return