Jump to content

7Zip Command Line Progress Bar


Recommended Posts

Hi all

Ive been having a look at this code here by guinness

The stuff im working on uses the Command line version of 7z.exe

As its a portable extractor for archive files and a few other things.

Unfortunatly guinness one uses the 7zG.exe graphic version, which i can get working like this

Func _7Zip_Extract($sZipFile, $sDestination)
    Local $aPercentage, $hHandle, $iPercentage = 0, $iPercentageBefore, $iPID, $s7ZipExe = @TempDir & "\7zG.exe" ;@TempDir & '\7z.exe'

    $iPID = Run('"' & $s7ZipExe & '" x "' & $sZipFile & '" ' & "-y -o" & '"' & $sDestination & '"', "", @SW_SHOW)

    Sleep(500) ; I don't know why but a Sleep() has to be there for the 7-Zip Handle to be found.
    $hHandle = _WinGetHandleByPID($iPID)

    While ProcessExists($iPID)
        $aPercentage = StringRegExp(WinGetTitle($hHandle), '(?s)(?i)\A(.*?)%', 3)
        If @error = 0 Then
            $iPercentage = $aPercentage[0]
        EndIf
        If $iPercentage <> $iPercentageBefore And $iPercentage > 0 And $iPercentage < 100 Then
            $iPercentageBefore = $iPercentage
                GUICtrlSetData($hProgress, $iPercentage & " %")
            ConsoleWrite("Percentage: " & $iPercentage & "%" & @CRLF)
        EndIf
        Sleep(20)
    WEnd
    Return $iPercentage
EndFunc   ;==>_7Zip_Extract

Func _WinGetHandleByPID($iPID, $iReturnArray = 0, $iVisibleOnly = 1) ; Taken From: http://www.autoitscript.com/forum/topic/126406-disable-red-x/page__view__findpost__p__877649 And By SmOke_N
    If IsInt($iPID) = 0 Then
        $iPID = ProcessExists($iPID)
    EndIf

    Local $aWinList = WinList()
    Local $aReturn[$aWinList[0][0] + 1], $iAdd

    For $A = 1 To $aWinList[0][0]
        If WinGetProcess($aWinList[$A][1]) = $iPID Then
            If $iVisibleOnly Then
                If BitAND(WinGetState($aWinList[$A][1]), 2) Then
                    If $iReturnArray = 0 Then
                        Return $aWinList[$A][1]
                    EndIf
                    $iAdd += 1
                    $aReturn[$iAdd] = $aWinList[$A][1]
                EndIf
            Else
                If $iReturnArray = 0 Then
                    Return $aWinList[$A][1]
                EndIf
                $iAdd += 1
                $aReturn[$iAdd] = $aWinList[$A][1]
            EndIf
        EndIf
    Next
    If Not $iAdd Then
        Return SetError(1, 0, -1)
    EndIf
    ReDim $aReturn[$iAdd + 1]
    $aReturn[0] = $iAdd
    Return $aReturn
EndFunc   ;==>_WinGetHandleByPID

This works but isnt portable as the file 7zG.exe dosent work on all machines, where as the 7z.exe command line version does

But the command line version doesnt read the graphic window as its missing and the cmd window doesnt have the progress count in the window title

Any ideas how to over come this?

EDIT

Just figured out it doesnt work either if you have the window hidden

Edited by Chimaera
Link to comment
Share on other sites

With the commandline version I've always settled for using a progress bar with the marquee style. See signature for 'progress and marquee.'

I don't believe there is any solution to what you're asking.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

With the commandline version I've always settled for using a progress bar with the marquee style. See signature for 'progress and marquee.'

I don't believe there is any solution to what you're asking.

 

Im inclined to agree, ill have a look at the suggestion thx

Link to comment
Share on other sites

Maybe I'm wrong, of course I would like to be proved wrong.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

What about this method?

;coded by UEZ 2013
#include <Constants.au3>
Global Const $sPath7Zip = '"c:\Program Files\7-Zip\7z.exe"'
Global $sArchive = '"c:\Temp\Archive.7z"'
Global $sDest = '"c:\Temp\"'

SevenZipExtract($sArchive, $sDest)

Func SevenZipExtract($sArchive, $sOutDir = @ScriptDir)
    Local $iMax = SevenZipGetFF($sArchive)
    Local $iPID = Run($sPath7Zip & " x " & $sArchive & " -o" & $sOutDir & " -y *", @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Sleep(50)
    Local $sConsole
    ProgressOn("Progress Meter", "Extracting archive", "0 % (0 / " & $iMax & ")")
    Do
        $sConsole &= StdoutRead($iPID)
        If @error Then ExitLoop
        $aResult = StringRegExp($sConsole, "(Extracting\h+.*)", 3)
        $iPerc = Int(UBound($aResult) / $iMax * 100)
        ProgressSet($iPerc, $iPerc & " % (" & UBound($aResult) & " / " & $iMax & ")")
    Until Not Sleep(10)
    ProgressOff()
EndFunc

Func SevenZipGetFF($sArchive)
    Local $iPID = Run($sPath7Zip & " l " & $sArchive, @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Sleep(50)
    Local $sConsole
    Do
        $sConsole &= StdoutRead($iPID)
        If @error Then ExitLoop
    Until Not Sleep(10)
    Local $aResult = StringRegExp($sConsole, "\h*(\d+)\hfiles", 1)
    Local $iFiles = $aResult[0]
    $aResult =  StringRegExp($sConsole, ",\h*(\d+)\hfolders", 1)
    Local $iFolders = $aResult[0]
    Return Int($iFiles + $iFolders)
EndFunc
Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

My bad, I was talking about compressing, not extracting.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Same concept for compression

;coded by UEZ 2013

#include <Constants.au3>
Global Const $sPath7Zip = '"c:\Program Files\7-Zip\7z.exe"'
Global $sFiles = '"c:\Temp"'
Global $sArchive = '"c:\Test.7z"'

SevenZipAdd($sFiles, $sArchive)

Func SevenZipAdd($sFiles, $sArchive)
    Local $iMax = GetAmountFF($sFiles)
    Local $iPID = Run($sPath7Zip & " a " & $sArchive & " -r " & $sFiles, @ScriptDir, @SW_HIDE, $STDERR_MERGED)
    Sleep(50)
    Local $sConsole, $sLine, $iUB
    ProgressOn("Progress Meter", "Adding to archive", "0 % (0 / " & $iMax & ")")
    Do
        $sConsole &= StdoutRead($iPID)
        If @error Then ExitLoop
        $aResult = StringRegExp($sConsole, "(Compressing\h+.*)", 3)
        $iUB = UBound($aResult)
        $iPerc = Int($iUB / $iMax * 100)
        ProgressSet($iPerc, $iPerc & " % (" & UBound($aResult) & " / " & $iMax & ")")
    Until Not Sleep(10)
    ProgressOff()
EndFunc


Func GetAmountFF($sPath)
    Local $iPID = Run(@ComSpec & " /c dir /b /s " & $sPath, @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    Sleep(50)
    Local $sConsole
    Do
        $sConsole &= StdoutRead($iPID)
        If @error Then ExitLoop
    Until Not Sleep(10)
    StringReplace($sConsole, @CRLF, @CRLF)
    Return @extended + 1
EndFunc

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Okay now I see what you're doing. I missed the function GetAmountFF the last time. This doesn't work in the setup I have.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

The method UEZ is using is finding the number of files in a folder first, then parsing the output using a regular expression for "compressing filename" and using UBound to find the size of the array. Then the rest is basic maths.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

;) If you say so

Ive been having a play with but i keep getting this error

E:\Code\Projects\Unpacker.au3 (195) : ==> Subscript used with non-Array variable.:
Local $iFiles = $aResult[0]
Local $iFiles = $aResult^ ERROR

Which im guessing is that it hasnt found an array data somewhere

As a thought i only give my archive value as a single file not an array, maybe thats the cause, i basically just give it the file to unpack

Anyway back to it

Btw im calling it like this

$aRarFile = _RecFileListToArray(@ScriptDir, "*.rar|*.part*", 1, 0)
;~      _ArrayDisplay($aRarFile, ".Rar Files")
        If IsArray($aRarFile) Then
            $FileEnd = StringTrimLeft(_ArrayToString($aRarFile), 2)
            SevenZipExtract($FileEnd, @ScriptDir)
;~          $test = RunWait(@ComSpec & ' /c ' & @TempDir & '\7z.exe' & ' x -y ' & '"' & $FileEnd & '"', "", @SW_HIDE)
            Sleep(2000)
        EndIf
Edited by Chimaera
Link to comment
Share on other sites

My 7z.exe version is 7-Zip v9.30 alpha (x64).

The output might be different on other versions snd thus the regex will not work. The idea how to get a progessbar was the important part for me.

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...