本帖最后由 K、Q 于 2011-4-9 11:06 编辑 #include <7Zip.au3>
Func InCmdLine()
For $u2 = 2 To $Iniread[0]
If $Iniread[0] > 6 Then Exit
$FullNameICL = IniRead($Ini,$Iniread[$u2],"Fullname","")
Dim $ArcOriginalSizeICL
$OArcICL = _7ZipOpenArchive(0,@ScriptDir & "" & $FullNameICL)
If $OArcICL = 0 Then Exit
$FFArcICL = _7zipFindFirst($OArcICL,"*.*")
If $FFArcICL = -1 Then Exit
While 1
$FNArcICL = _7ZipFindNext($OArcICL,$FFArcICL)
If $FNArcICL = 0 Then ExitLoop
$GetSizeICL = DllStructGetData($FNArcICL,"dwOriginalSize")
$ArcOriginalSizeICL += $GetSizeICL
WEnd
$MBArcOriginalSizeICL = Round($ArcOriginalSizeICL / 1048576,0)
_7ZipCloseArchive(@ScriptDir & "" & $FullNameICL)
$SoftSizeICL = FileGetSize(@ScriptDir & "" & $FullNameICL)
If @error = 0 Then
If $Type = "Fixed" And $Space >= 150 Then
RunWait(_7ZIPExtractEx("",@ScriptDir & "" & $FullNameICL,"D:",1))
Else
RunWait(_7ZIPExtractEx("",@ScriptDir & "" & $FullNameICL,@DesktopCommonDir,1))
EndIf
If $Kill = 1 Then
FileDelete(@ScriptDir & "" & $FullNameICL)
EndIf
EndIf
Next
EndFunc ;==>InCmdLine
忘记加上Round,嘻嘻.. |