重启电脑资源管理器
RestartExplorer()
; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=81252
RestartExplorer( WaitSecs:=10 ) { ; requires OS Vista+ ; v2.10 by SKAN on CSC7/D39N
Local PID, Explorer, ID:=WinExist("ahk_class Progman") ; @ tiny.cc/restartexplorer2
WinGet, PID, PID
WinGet, Explorer, ProcessPath
PostMessage, 0x5B4, 0, 0,, ahk_class Shell_TrayWnd ; WM_USER+436
Process, WaitClose, %PID%, % ( PID ? WaitSecs : (WaitSecs:=0) )
If (PID && !Errorlevel)
Run, %Explorer%
WinWait, ahk_class Progman,, %WaitSecs%
Return (WinExist()!=ID)
}
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。

评论(0)