Skip to content

Commit

Permalink
fix switchhiddenfiles bug
Browse files Browse the repository at this point in the history
  • Loading branch information
m2nlight committed Jun 8, 2018
1 parent 4cf1e2f commit 6b525e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions machotkey.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
SetWorkingDir, %A_ScriptDir%

global my_name := "MacHotKey"
global my_version := "v0.2.14"
global my_version := "v0.2.15"
global my_bit := A_PtrSize * 8
global my_website := "https://github.com/m2nlight/AHKShortcutLikeMac"

Expand Down Expand Up @@ -618,7 +618,12 @@ RunNewInstance(cmd, runAsAdmin = false) {

SwitchHiddenFiles() {
SetRegView %my_bit%
RegRead, OutputVar, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden
try {
RegRead, OutputVar, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden
}
catch {
OutputVar = 0
}
if (OutputVar and OutputVar = 1) {
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, ShowSuperHidden, 0
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
Expand Down

0 comments on commit 6b525e0

Please sign in to comment.