Trong Posted February 12, 2013 Posted February 12, 2013 New Link in: http://www.autoitscript.fr/forum/viewtopic.php?f=21&t=1943 7Zip_UDF.zip Regards,
toolix Posted February 24, 2013 Posted February 24, 2013 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 TlemI have tested nearly all functions and only found one problem until nowUsing 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 _ARCHIVERPROCthe 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 ExitWhile 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, "")EndSwitchWEndFunc _ARCHIVERPROC($hWnd, $Msg, $nState, $ExInfo)Local $iFileSize, $iWriteSize, $iPercent = 0If $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 1EndIfIf $nState = 2 Then GUICtrlSetData($ctlProgress, 100)Return 1EndFunc
LynnS Posted September 30, 2013 Posted September 30, 2013 This looks like a very useful UDF, but the download file only contains two web URLs, neither of them work.
Rogue5099 Posted September 30, 2013 Posted September 30, 2013 This looks like a very useful UDF, but the download file only contains two web URLs, neither of them work. Try HERE My projects: Inventory / Mp3 Inventory, Computer Stats
ilko Posted September 30, 2013 Posted September 30, 2013 (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 September 30, 2013 by ilko
CodingCody37 Posted August 20, 2014 Posted August 20, 2014 (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 August 20, 2014 by CodingCody37
meows Posted February 1, 2015 Posted February 1, 2015 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 SmOke_N Posted February 1, 2015 Moderators Posted February 1, 2015 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.
Mugen Posted February 17, 2015 Posted February 17, 2015 (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 February 17, 2015 by Mugen
Moderators SmOke_N Posted February 18, 2015 Moderators Posted February 18, 2015 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.
Mugen Posted February 19, 2015 Posted February 19, 2015 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?
meows Posted February 21, 2015 Posted February 21, 2015 7887 SmOke_N Mugen Bless you all., And Thank you!@ I think I am blind in one eye and can't see out of the other!
bdr529 Posted February 8, 2016 Posted February 8, 2016 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
TrunghieuTH10 Posted July 2, 2017 Posted July 2, 2017 (edited) Thanks. It's worked! Edited July 2, 2017 by TrunghieuTH10
avmaksimov Posted June 29, 2018 Posted June 29, 2018 Thank you for pretty UDF. But I have to get file list and then extract some files from crypted archive. How I can do this?
Bresacon Posted September 6, 2020 Posted September 6, 2020 I think there's an error in _7ZipShutdown(). Where it says: If @Compiled Then If Not FileDelete($sCompiledPath & $sZip32Dll) Or Not _ FileDelete($sCompiledPath & $sZip64Dll) Then Return SetError(1, 0, 0) EndIf The OR should be an AND.
mLipok Posted January 28, 2021 Posted January 28, 2021 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 Code * 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 API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * 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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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" , 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: 2023-04-24
Moderators JLogan3o13 Posted January 28, 2021 Moderators Posted January 28, 2021 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!
mLipok Posted January 28, 2021 Posted January 28, 2021 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 Code * 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 API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * 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 TaskScheduler * IE 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 stuff * OnHungApp handler * Avoid "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" , 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: 2023-04-24
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now