因為網路上都找不到,只好自己查來改。(不過我也只改了幾個字XD)
將 script 貼到 AHK 檔即可使用:
#
;使用win+Numpad的「*」來隱藏/顯示隱藏檔
;Hidden(1=顯示, 2=隱藏)
#NumpadMult::
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
If HiddenFiles_Status = 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
Else
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
WinGetClass, eh_Class,A
If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA")
send, {F5}
Else PostMessage, 0x111, 28931,,, A
return
另外還可以改隱藏或顯示系統檔,名稱是 ShowSuperHidden,值 0=隱藏,1=顯示。
不過系統檔我都是預設打開,所以只要隱藏檔打開我就看得到,所以就沒寫了。XD
2010/7/25 新增隱藏/顯示副檔名
#
;使用win+Numpad的「.」來隱藏/顯示副檔名
;HideFileExt(0=顯示, 1=隱藏)
#NumpadDot::
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
PS:Windows 7 寫完登錄檔後,改成直接「send, {F5}」才能正常運作。或將第8行改成
#
If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA" OR "WIN_7")
沒有留言:
張貼留言