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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| !w:: exitProcessHalo() Sleep, 5 HideOrShowDesktopIcons() return
exitProcessHalo(){ Process, Exist, HaloTray.exe NewPID = %ErrorLevel% if NewPID = 0 { Run, C:\Program Files (x86)\HaloDesktop\HaloTray.exe } else { Loop { Process, Close, HaloTray.exe Process, wait, HaloTray.exe, 0.1 NewPID = %ErrorLevel% if NewPID = 0 { break } } Process, WaitClose, HaloTray.exe } } HideOrShowDesktopIcons() { ControlGet, class, Hwnd,, SysListView321, ahk_class Progman If class = ControlGet, class, Hwnd,, SysListView321, ahk_class WorkerW If DllCall("IsWindowVisible", UInt,class) WinHide, ahk_id %class% Else WinShow, ahk_id %class% }
|