Advertisement
Najeebsk

HideShowEXTENSIONS.ahk

Nov 10th, 2022
1,218
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.  
  9. =-=-=-
  10. q:: ;toggle hide/show hidden files (tested on Windows 7)
  11. ;SSF_SHOWEXTENSIONS := 0x2
  12. vNum := 0x2
  13. VarSetCapacity(SHELLSTATE, 36, 0)
  14. DllCall("shell32\SHGetSetSettings", "Ptr",&SHELLSTATE,
  15.  
  16. "UInt",vNum, "Int",0)
  17. vState := NumGet(SHELLSTATE, "UInt")
  18. NumPut(vState ? 0 : vNum, SHELLSTATE, "UInt")
  19. DllCall("shell32\SHGetSetSettings", "Ptr",&SHELLSTATE,
  20.  
  21. "UInt",vNum, "Int",1)
  22.  
  23. ;refresh Desktop/folder windows
  24. DetectHiddenWindows, On
  25. GroupAdd, WinGroupFolder, ahk_class CabinetWClass
  26. GroupAdd, WinGroupFolder, ahk_class ExploreWClass
  27. PostMessage, 0x111, 28931,, SHELLDLL_DefView1,
  28.  
  29. ahk_class Progman
  30. WinGet, vWinList, List, ahk_group WinGroupFolder
  31. Loop % vWinList
  32.     PostMessage, 0x111, 41504,,
  33.  
  34. ShellTabWindowClass1, % "ahk_id " vWinList%A_Index%
  35.     ;PostMessage, 0x111, 28931,,
  36.  
  37. SHELLDLL_DefView1, % "ahk_id " vWinList%A_Index%
  38.  
  39. ;also works
  40. Return
  41. ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  42.  
  43. =-=-=-=-=-=-=-=-=-
  44. #R::Reload  ;<--  ~ Reload Script ~
  45. #S::Suspend ;<--  ~ Suspend Script ~
  46. #P::Pause   ;<--  ~ Pause Script ~
  47. #M::WinMinimize, ;<--  ~ Minimize Script ~
  48. ESC::ExitApp     ;<--  ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement