Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0+
- #SingleInstance Force
- #`:: { ; Win+`
- hwnd := WinExist("ahk_class Progman") ? ControlGetHwnd("SysListView321", "ahk_class Progman") : ControlGetHwnd("SysListView321", "ahk_class WorkerW")
- if DllCall("IsWindowVisible", "UInt", hwnd) {
- ; Fade out
- Loop 20 {
- value := 255 - (A_Index * 12)
- if(value >= 254){
- WinSetTransparent("Off", "ahk_id " hwnd)
- }
- else{
- WinSetTransparent(value, "ahk_id " hwnd)
- }
- Sleep(20)
- }
- WinHide("ahk_id " hwnd)
- }
- else {
- WinShow("ahk_id " hwnd)
- ; Fade in
- Loop 20 {
- value := (A_Index * 12)
- if(value >= 254){
- WinSetTransparent("Off", "ahk_id " hwnd)
- }
- else{
- WinSetTransparent(value, "ahk_id " hwnd)
- }
- Sleep(20)
- }
- ;WinSetTransparent("Off", "ahk_id " hwnd)
- }
- ; Refresh desktop (no error)
- ;PostMessage(0x111, 0x7103,, 0xFFFF)
- }
Advertisement
Add Comment
Please, Sign In to add comment