Jump to content

Recommended Posts

  • 2 weeks later...
Posted

Hi Seeker,

do you have any new on this issue regarding dll 7zip add to archive with progress bar (no 7zg)? I've done several attempts to find a suitable and easy solution but wasn't lucky until today.

  On 1/6/2013 at 11:36 PM, 'ClausHviid said:

Hi Tlem

I have tested nearly all functions and only found one problem until now

Using the example script againt a very big zipped file > 2g and with individual files in the zip file bigger than > 2g

$iFileSize and $iWriteSize return wrong results sometime negative results in the function _ARCHIVERPROC

the error is both at 32 and 64 bit O/S

#include <GuiConstantsEx.au3>

#include <7Zip.au3>

$hGUI = GUICreate("_7ZIPExtractEx demo", 300, 200)

$ctlEdit = GUICtrlCreateEdit("", 10, 10, 280, 100)

$ctlProgress = GUICtrlCreateProgress(10, 130, 280, 20)

$ctlButton_Pack = GUICtrlCreateButton("Unpack!", 10, 167, 75, 23)

$ctlButton_Close = GUICtrlCreateButton("Close", 215, 167, 75, 23)

GUISetState()

$ArcFile = "c:testtest.7z.001"

If @error Then Exit

$sOutput = FileSelectFolder("Select output folder", "", 1, "", $hGUI)

If @error Then Exit

While 1

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE, $ctlButton_Close

Exit

Case $ctlButton_Pack

_7ZipStartup()

$retResult = _7ZipSetOwnerWindowEx($hGUI, "_ARCHIVERPROC")

If $retResult = 0 Then Exit MsgBox(16, "_7ZipAdd demo", "Error occured")

$retResult = _7ZIPExtractEx($hGUI, $ArcFile, $sOutput, 1)

_7ZipShutdown()

If @error = 0 Then

MsgBox(64, "_7ZIPExtractEx demo", "Archive unpacked successfully", 0, $hGUI)

Else

MsgBox(64, "_7ZIPExtractEx demo", "Error occurred", 0, $hGUI)

EndIf

;GUICtrlSetData($ctlProgress, 0)

;GUICtrlSetData($ctlEdit, "")

EndSwitch

WEnd

Func _ARCHIVERPROC($hWnd, $Msg, $nState, $ExInfo)

Local $iFileSize, $iWriteSize, $iPercent = 0

If $nState = 0 Then

Local $EXTRACTINGINFO = DllStructCreate($tagEXTRACTINGINFO, $ExInfo)

GUICtrlSetData($ctlEdit, DllStructGetData($EXTRACTINGINFO, "szSourceFileName") & @CRLF, 1)

$iFileSize = DllStructGetData($EXTRACTINGINFO, "dwFileSize")

$iWriteSize = DllStructGetData($EXTRACTINGINFO, "dwWriteSize")

$iPercent = Int($iWriteSize / $iFileSize * 100)

GUICtrlSetData($ctlProgress, $iPercent)

Return 1

EndIf

If $nState = 2 Then GUICtrlSetData($ctlProgress, 100)

Return 1

EndFunc

  • 7 months later...
Posted (edited)

Has anyone gotten this UDF to work with ISO files?

I am trying to extract an ISO file, but it fails. The same syntax works fine with zip file.

Edited by ilko
  • 10 months later...
Posted (edited)

Hi ! I'm using this UDF and it's really useful, I found a little bug though so I'll inform about it here in case you find your script failing for some archives like I did... kinda minor but, present.

If you have an archive with more than one contiguous space character in the name like this :

'My   archive   name.zip'

then it will extract it (using either _7zipExtract or _7zipExtractEx) it in this directory : (assuming you use your filename as destination, minus extension)

'My archive name'

in other words, it reduces contiguous spaces to one automatically, and the only workaround I found is to rename all my archives before using my script... (or to rename destination Dir after the extraction but I shouldn't have had to do that)

Perhaps are the Dlls involved in this, no idea. Just telling. What I know is if you extract it with 7Zip context menu in Explorer, then it keeps the true name and all the spaces.

Edited by CodingCody37
  • 5 months later...
Posted
68

this must be a April Fools joke  the link is for

7zip_udf.url which is fake or dead

and

mirror7zip_udf.url which is also fake or dead.

links go to files not other links why was it not

Attach Files

   You can upload up to 8MB of files (Max. single file size: 8MB)

  • Moderators
Posted

3 posts up

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • 3 weeks later...
Posted (edited)

There is a small mistake in the _7ZipStartup() function.

It decides to load the dll depending on the OS, but it needs to depend on the exe.

Here is a fix.

Func _7ZipStartup()
    If Not @Compiled Then ; If not compiled, test and open the right dll
        If Not FileExists($sNoCompiledPath & $sZip32Dll) And _
           Not FileExists($sNoCompiledPath & $sZip64Dll) Then Return SetError(2, 0, 0)
        If Not @AutoItX64 Then
            $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip32Dll) ; Open x32 dll from no compiled path
        Else
            $hDLL_7ZIP = DllOpen($sNoCompiledPath & $sZip64Dll) ; Open x64 dll from no compiled path
        EndIf
    Else ; If compiled, test and open the right dll (that must be in ScriptDir for compiling)
        If Not @AutoItX64 Then
            If Not FileInstall("7-zip32.dll", $sCompiledPath & $sZip32Dll, 1) Then Return SetError(3, 0, 0)
            $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip32Dll) ; Open x32 dll from FileInstall path
        Else
            If Not FileInstall("7-zip64.dll", $sCompiledPath & $sZip64Dll, 1) Then Return SetError(3, 0, 0)
            $hDLL_7ZIP = DllOpen($sCompiledPath & $sZip64Dll) ; Open x64 dll from FileInstall path
        EndIf
    EndIf
    If $hDLL_7ZIP = -1 Then Return SetError(1, 0, 0) ; If no dll handle, return error
    Return 1
EndFunc   ;==>_7ZipStartup
Edited by Mugen
  • Moderators
Posted

I mentioned that here as well: 

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Oh, haven't seen your post. But properly it's good to have it mentioned in this topic, too.

BTW: Does anyone have an idea why using this UDF, even with silent option

is so much slower than using 7z.exe?

  • 11 months later...
Posted

sorry for my bad english

I have the problem with accented characters

example for

_7ZipExtractEx($dHnd, $hWnd, $sArcName,........

$sArcName="c:\examplè\archive.zip"

or

$sArcName="c:\example\archìve.zip"

To community goes all my regards and thanks

  • 1 year later...
  • 11 months later...
  • 2 years later...
  • 4 months later...
Posted

Where is recent version of this UDF ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

  • Moderators
Posted
  On 1/28/2021 at 11:37 AM, mLipok said:

Where is recent version of this UDF ?

 

Expand  

13 posts up:

  On 9/30/2013 at 6:21 PM, Rogue5099 said:

Try HERE :)

Expand  

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

Unfortunately it does not work.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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
  • Recently Browsing   0 members

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