EzFlow997

Hotkey-FadeDesktopIconsToggle Modify V1

Dec 14th, 2025
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Autohotkey 0.95 KB | Source Code | 0 0
  1. #Requires AutoHotkey v2.0+
  2. #SingleInstance Force
  3.  
  4. #`:: { ; Win+`
  5.     hwnd := WinExist("ahk_class Progman") ? ControlGetHwnd("SysListView321", "ahk_class Progman") : ControlGetHwnd("SysListView321", "ahk_class WorkerW")
  6.     if DllCall("IsWindowVisible", "UInt", hwnd) {
  7.         ; Fade out
  8.         Loop 20 {
  9.             value := 255 - (A_Index * 12)
  10.             if(value >= 254){
  11.                 WinSetTransparent("Off", "ahk_id " hwnd)
  12.             }
  13.             else{
  14.                 WinSetTransparent(value, "ahk_id " hwnd)
  15.             }
  16.             Sleep(20)
  17.         }
  18.         WinHide("ahk_id " hwnd)
  19.     }
  20.     else {
  21.         WinShow("ahk_id " hwnd)
  22.         ; Fade in
  23.         Loop 20 {
  24.             value := (A_Index * 12)
  25.             if(value >= 254){
  26.                 WinSetTransparent("Off", "ahk_id " hwnd)
  27.             }
  28.             else{
  29.                 WinSetTransparent(value, "ahk_id " hwnd)
  30.             }
  31.             Sleep(20)
  32.         }
  33.         ;WinSetTransparent("Off", "ahk_id " hwnd)
  34.     }
  35.     ; Refresh desktop (no error)
  36.     ;PostMessage(0x111, 0x7103,, 0xFFFF)
  37. }
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment