AutoHotkey内置函数解压文件
使用windows内置的函数用能实现解压文件
SmartZip(需要解压文件的路径,解压到的位置) return SmartZip(s, o, t = 4) { IfNotExist, %s% return, -1 oShell := ComObjCreate("Shell.Application") if InStr(FileExist(o), "D") or (!FileExist(o) and (SubStr(s, -3) = ".zip")) { if !o o := A_ScriptDir else ifNotExist, %o% FileCreateDir, %o% Loop, %o%, 1 sObjectLongName := A_LoopFileLongPath oObject := oShell.NameSpace(sObjectLongName) Loop, %s%, 1 { oSource := oShell.NameSpace(A_LoopFileLongPath) oObject.CopyHere(oSource.Items, t) } } }