Skip to content

Instantly share code, notes, and snippets.

@zhaocai
Created August 28, 2016 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhaocai/c2421f246a525a35865be7eced55dbfc to your computer and use it in GitHub Desktop.
Save zhaocai/c2421f246a525a35865be7eced55dbfc to your computer and use it in GitHub Desktop.
; WINDOWS KEY + Y TOGGLES FILE EXTENSIONS
#y::
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt
If HiddenFiles_Status = 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 0
Else
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 1
WinGetClass, eh_Class,A
If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA")
send, {F5}
Else PostMessage, 0x111, 28931,,, A
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment