thexshadow Posted March 10, 2010 Posted March 10, 2010 Title kind of says it all, I have tried to use this UDF http://www.autoitscript.com/forum/index.php?showtopic=91283, but I always error. Is there an easier way to stream the 7z add or 7z extract to a GUICtrlCreateEdit box?
thexshadow Posted March 11, 2010 Author Posted March 11, 2010 (edited) Sorry for the bump, 24 hr.I have also tried this.http://www.autoitscript.com/forum/index.php?showtopic=85094&hl=7zip&st=0I always get an error.or with a different dll.Any ideas? Edited March 11, 2010 by thexshadow
logo78 Posted March 21, 2010 Posted March 21, 2010 ur are probably using the wrong 7z.dllTake this one.
GEOSoft Posted March 22, 2010 Posted March 22, 2010 I don't have what I need to play with this right now but here is a suggestion. Run the command using 7z.exe but direct the results to a text file using > somefile.txt If the file is generated then you can use GUICtrlSetData($hEdit, FileRead("somefile.txt") George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted March 24, 2010 Posted March 24, 2010 As I suspected, the code is not coming from your script. Without checking 7Zip.au3 I'll take a guess that it's okay to add a line before that one that reads as follows If NOT IsArray($aRet) Then Return SetError(1, 1) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
thexshadow Posted March 24, 2010 Author Posted March 24, 2010 Ok, that removed the error popups, but now this is what I get.
enaiman Posted March 25, 2010 Posted March 25, 2010 Don't you think it is about time you provide some code? I think it is only a matter of time until people will completely stop helping you, playing "guess what I do wrong in my script?" game is annoying. It is likely that you call some function with the wrong parameters. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
thexshadow Posted March 26, 2010 Author Posted March 26, 2010 (edited) I have tried using all of the provided example scripts in the archive (In Rasims download) to test, but all of them fail. I have yet to make anything as it is not working! Edited March 26, 2010 by thexshadow
thexshadow Posted March 29, 2010 Author Posted March 29, 2010 #include <7Zip.au3> ;Example #1 $ArcFile = FileOpenDialog("Select archive", "", "Archive Files (*.7z;*.zip;*.gzip;*.bzip2;*.tar)") If @error Then Exit $Output = FileSelectFolder("Select output folder", "") If @error Then Exit $retResult = _7ZIPExtract(0, $ArcFile, $Output) If @error = 0 Then MsgBox(64, "_7ZIPExtractEx", $retResult) Else MsgBox(64, "_7ZIPExtractEx", "Error occurred") EndIf ;Example #2 $ArcFile = FileOpenDialog("Select archive", "", "Archive Files (*.7z;*.zip;*.gzip;*.bzip2;*.tar)") If @error Then Exit $Output = FileSelectFolder("Select output folder", "") If @error Then Exit $retResult = _7ZIPExtract(0, $ArcFile, $Output, 0, 0, 1, 0, 0, 0, "*.wav") If @error = 0 Then MsgBox(64, "_7ZIPExtractEx", $retResult) Else MsgBox(64, "_7ZIPExtractEx", "Error occurred") EndIf
enaiman Posted March 29, 2010 Posted March 29, 2010 Your first example works very well; I've tested on a *.zip file and everything was OK. Be sure that 7-zip.dll is in your script folder. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
thexshadow Posted March 30, 2010 Author Posted March 30, 2010 (edited) Bah, stupid. I'm stupid, I was running it in x64 mode, tried in x86 and bam, works. Thank's everyone.One last error.I have tried removing Local and adding in Global, but that dos not work. I cant really think of anything else, any ideas?Func _Archive($hWnd, $Msg, $nState, $ExInfo) Local $iFileSize, $iWriteSize, $iPercent = 0 If $nState = 0 Then Local $EXTRACTINGINFO = DllStructCreate($tagEXTRACTINGINFO, $ExInfo) <----------------------------- GUICtrlSetData($BE, DllStructGetData($EXTRACTINGINFO, "szSourceFileName") & @CRLF, 1) $iFileSize = DllStructGetData($EXTRACTINGINFO, "dwFileSize") $iWriteSize = DllStructGetData($EXTRACTINGINFO, "dwWriteSize") $iPercent = Int($iWriteSize / $iFileSize * 100) GUICtrlSetData($Progress, $iPercent) Return 1 EndIf If $nState = 2 Then GUICtrlSetData($Progress, 100) Return 1 EndFunc Edited March 30, 2010 by thexshadow
GEOSoft Posted April 27, 2010 Posted April 27, 2010 Without my crystal scriptalyzer to see the pertinant part of your code it's pretty much guess work since firstly there are not 84 lines of code there (Line 84) and the pertinant part of the code If NOT IsArray($aRet) Then Return SetError(1, 1) also isn't there so just on a hunch I'm going to say that either $aRet is not declared at all or it's declared after the fact OR you have it inside of some function and you are attempting to reference it from another function. Try putting Global $aRet at the top of the script and then lets see what errors you get. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
thexshadow Posted April 28, 2010 Author Posted April 28, 2010 I added Global $aRet to the top in the first place, but forgot to run it in x86 mode again... Thank you again Geo, you are god.
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