Jump to content

netmaple

Members
  • Posts

    7
  • Joined

Everything posted by netmaple

  1. good
  2. Hello there The code itself can use 7zG.exe, I ask for advice how to solve, FileGetSize 7zip sub-volume compressed file release callback problem.
  3. The actual test found that _7ZIPExtractEx_Example_using_Callback.au3 more than 2G file callback, stuck and unable to display the progress bar, memory overflow, latest version of 7-zip32.dll 19.0.0.3, the problem remains.
  4. I am a novice and my English is not very good, I hope everyone can understand my statement and give me some advice, thanks. The code is very suitable for echoing the progress bar when the 7z file is released, but FileGetSize cannot correctly echo the progress bar when encountering multiple sub-volume compressed files. For example, AA.7z.001, AA.7z.002, AA.7z.003, AA.7z.004, AA.7z.005, AA.7z.006, AA.7z.007, AA.7z.008, AA .7z.009, AA.7z.010…………, FileGetSize can only progress by AA.7z.001. The card is 100% completed. Please help me, and help me solve the file detection part of FileGetSize. thank. #include <array.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> Global $Title = "7zip progress echo demo" $hGUI = GUICreate($Title, 320, 80,-1,-1) $progressbar = GUICtrlCreateProgress(10, 10, 300, 30) $btn = GUICtrlCreateButton("Start", 125, 45, 70, 30) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn $ExtrTarget = 'E:\DP' ;Release path $ExtrSource = 'E:\mtest.7z' ;Target file $UnPack_line = ' x -y -o' & '"'& $ExtrTarget & '"' & ' ' & '"'& $ExtrSource & '"' _GetPIODataSend2Bar('7za.exe', $UnPack_line, FileGetSize($ExtrSource), $progressbar) GUICtrlSetData($progressbar, 100) MsgBox(0, '', 'Successful release') GUICtrlSetData($progressbar, 0) GUICtrlSetData($hGUI, "") Exit EndSwitch WEnd Func _GetPIODataSend2Bar($Execute, $Commandline, $Param, $Ctrl) Local $Pid, $PIOData, $iPercentage, $iPercentageBefore $Pid = Run ($Execute & $Commandline, '', @SW_HIDE) While ProcessExists($Pid) $PIOData = ProcessGetStats($Execute, 1) If @error Then MsgBox(0, '', $Execute) Else $iPercentage = Round($PIOData[3]/$Param*100) If $iPercentage <> $iPercentageBefore And $iPercentage > 0 And $iPercentage <= 100 Then ConsoleWrite('->-' & $iPercentage & @CRLF) GUICtrlSetData($Ctrl , $iPercentage) WinSetTitle($hGUI, "", $Title & " " & $iPercentage & "%") EndIf EndIf WEnd Return $iPercentage EndFunc
  5. #include <array.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> GUICreate("ProgressBar tEST", 220, 100) $progressbar = GUICtrlCreateProgress(10, 10, 200, 20) $btn = GUICtrlCreateButton("do", 140, 70, 70, 20)   GUISetState() While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         Case $btn             $ExtrTarget = 'C:\data'             $ExtrSource = 'C:\test.7z'             $UnPack_line = ' x -y -o' & '"'& $ExtrTarget & '"' & ' ' & '"'& $ExtrSource & '"'             $PackSource = 'C:\data'             $PackTarget = 'C:\test.7z'             $Pack_line = ' a -t7z -mx=9 ' & '"'& $PackTarget & '"' & ' ' & '"'& $PackSource & '"' & '\*'             _GetPIODataSend2Bar('7zg.exe', $Pack_line, DirGetSize('C:\data'), $progressbar);;;for testing 7z pack             ;_GetPIODataSend2Bar('7zg.exe', $UnPack_line, FileGetSize('C:\test.7z'), $progressbar);;;for testing 7z unpack             GUICtrlSetData($progressbar, 100)             MsgBox(0, '', 'Successfully')             GUICtrlSetData($progressbar, 0)     EndSwitch WEnd Func _GetPIODataSend2Bar($Execute, $Commandline, $Param, $Ctrl)     Local $Pid, $PIOData, $iPercentage, $iPercentageBefore     $Pid = Run ($Execute & $Commandline, '', @SW_HIDE)     While ProcessExists($Pid)         $PIOData = ProcessGetStats($Execute, 1)         If @error Then            MsgBox(0, '', 'Cant get I/O info from current process')         Else             $iPercentage = Round($PIOData[3]/$Param*100)             If $iPercentage <> $iPercentageBefore And $iPercentage > 0 And $iPercentage <= 100 Then                ConsoleWrite('->-' & $iPercentage & @CRLF)                GUICtrlSetData($Ctrl , $iPercentage)             EndIf         EndIf     WEnd     Return $iPercentage EndFunc Hello there The above script is very good, but in the actual application process, it is found that FileGetSize single file returns the progress bar is no problem. If it is 7-zip sub-volume compression such as "aa.7z.001-aa.7z.020" then FileGetSize cannot return the correct value. It can only be based on aa.7z.001 which causes the progress bar to fail to display the real progress. Is there a solution to decompress multiple files?
  6. _SevenZip_Extract
×
×
  • Create New...