autohotkey快捷键显示隐藏文件和文件扩展名

来源:互联网 发布:暴雪降至 知乎 编辑:程序博客网 时间:2024/05/16 00:29

下面是我日常使用的ahk脚本中的一部分.

可以很方便的在资源管理器中使用快捷键显示隐藏文件或者文件扩展名, 提高工作效率.


#SingleInstance force      ;force a single instance#HotkeyInterval 0          ;disable the warning dialog if a key is held down#InstallKeybdHook          ;Forces the unconditional installation of the keyboard hook#MaxThreads 20             ;use 20 (the max) instead of 10 threads;#NoTrayIcon#NoEnvSetBatchLines, -1          ;makes the script run at max speedSetKeyDelay , -1, -1       ;faster response (might be better with -1, 0)DetectHiddenText, OnDetectHiddenWindows, On    ;detect hidden window;;win7资源管理器的窗口类名, 如果是XP下, 需要修改GroupAdd, Win7ShellClass, ahk_class WorkerWGroupAdd, Win7ShellClass, ahk_class ProgmanGroupAdd, Win7ShellClass, ahk_class CabinetWClassGroupAdd, Win7ShellClass, ahk_class #32770#IfWinActive,ahk_group Win7ShellClass;;CTRL+Q显示隐藏系统文件^Q::RegRead,value,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\, HiddenIf(value=1)value = 2Elsevalue = 1RegWrite, REG_DWORD, HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\, Hidden, %Value%RegWrite, REG_DWORD, HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\, ShowSuperHidden, %Value%-1PostMessage,0x111,0x7103,0,SHELLDLL_DefView1,Areturn;;CTRL+W显示文件扩展名^W::RegRead,Value,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\,HideFileExtIf(value=0)value = 1Elsevalue = 0RegWrite, REG_DWORD,HKEY_CURRENT_USER,Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\,HideFileExt, %Value%PostMessage,0x111,0x7103,0,SHELLDLL_DefView1,Areturn#IfWinActive


0 0