-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcfg FileExplore.ahk
41 lines (39 loc) · 1.26 KB
/
cfg FileExplore.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#Requires AutoHotKey 2.0.10
ToggleExtension() { ; Toggle file extension
static reg_path := "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
HiddenFiles_Status := RegRead(reg_path, 'HideFileExt')
if (HiddenFiles_Status = 1) {
RegWrite('0', 'REG_DWORD', reg_path, 'HideFileExt')
} else {
RegWrite('1', 'REG_DWORD', reg_path, 'HideFileExt')
}
; eh_Class := WinGetClass("A")
;if (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA")
if WinActive("ahk_class CabinetWClass") {
SendInput '{F5}'
} else {
static msgNum:=0x111
, wParam := 28931
PostMessage(msgNum,wParam,,,"A")
}
Return
}
ToggleHidden() { ; Toggle hidden files
reg_path := "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
HiddenFilesStatus := RegRead(reg_path, 'Hidden')
if (HiddenFilesStatus = 2) {
RegWrite('1', 'REG_DWORD', reg_path, 'Hidden')
} else {
RegWrite('2', 'REG_DWORD', reg_path, 'Hidden')
}
; eh_Class := WinGetClass("A")
;if (eh_Class = "CabinetWClass" OR A_OSVersion = "WIN_VISTA")
If WinActive("ahk_class CabinetWClass") {
Send('{F5}')
} else {
static msgNum:=0x111
, wParam := 28931
PostMessage(msgNum,wParam,,,"A")
}
Return
}