Jump to content

Recommended Posts

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I just check all files which was available here, collect them and post them to this download link/section:   REMARK / WARNING: Some of them are little refactored. Each have add links to

Hi everyone! Ok, after searching for any solution about works with 7Zip archives I found this interesting topic with several examples. And within several days I have written this UDF Main features:

  • 2 weeks later...

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.

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

Link to post
Share on other sites
  • 7 months later...
  • 10 months later...

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
Link to post
Share on other sites
  • 5 months later...
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)

Link to post
Share on other sites
  • 3 weeks later...

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
Link to post
Share on other sites
  • 11 months later...
  • 1 year later...
  • 11 months later...
  • 2 years later...
  • 4 months later...

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 for other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2022-03-07

Link to post
Share on other sites
  • Moderators
5 hours ago, mLipok said:

Where is recent version of this UDF ?

 

13 posts up:

On 9/30/2013 at 11:21 AM, Rogue5099 said:

Try HERE :)

 

"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!

Link to post
Share on other sites

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 for other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) *

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2022-03-07

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

    No registered users viewing this page.

×
×
  • Create New...