Advertisement
Najeebsk

HideShowDesktopIcons.ahk

Nov 10th, 2022
1,312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; <COMPILER: v1.1.34.04>
  2. #NoEnv
  3. #SingleInstance, Force
  4. SetBatchLines, -1
  5. ;#NoTrayIcon
  6. SetWorkingDir %A_ScriptDir%  
  7. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-
  8. q:: ;toggle hide/show desktop icons (tested on windows 7)
  9. PostMessage, 0x111, 29698,, SHELLDLL_DefView1, ahk_class Progman ;show desktop icons (toggle)
  10. return
  11.  
  12. w:: ;show desktop icons (tested on windows 7)
  13. ControlGet, vCtlStyle, Style,, SysListView321, ahk_class Progman
  14. if !(vCtlStyle & 0x10000000) ;WS_VISIBLE := 0x10000000
  15.     PostMessage, 0x111, 29698,, SHELLDLL_DefView1, ahk_class Progman ;show desktop icons (toggle)
  16. return
  17.  
  18. e:: ;hide desktop icons (tested on windows 7)
  19. ControlGet, vCtlStyle, Style,, SysListView321, ahk_class Progman
  20. if (vCtlStyle & 0x10000000) ;WS_VISIBLE := 0x10000000
  21.     PostMessage, 0x111, 29698,, SHELLDLL_DefView1, ahk_class Progman ;show desktop icons (toggle)
  22. Return
  23. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  24. #R::Reload  ;<--  ~ Reload Script ~
  25. #S::Suspend ;<--  ~ Suspend Script ~
  26. #P::Pause   ;<--  ~ Pause Script ~
  27. #M::WinMinimize, ;<--  ~ Minimize Script ~
  28. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement