ZIP.au3 UDF in pure AutoIt
#144
Posted 08 May 2009 - 11:20 PM
#include <Zip.au3> $pkg = @ScriptDir & "FileName" _Zip_UnzipAll($pkg & ".vts", @ScriptDir)
when I try this I just get a error in the SciTE editor
>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Administrator\Desktop\testing\data\unpack.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>15:18:04 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI) >Running AU3Check (1.54.14.0) from:C:\Program Files\AutoIt3 +>15:18:04 AU3Check ended.rc:0 >Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\testing\data\unpack.au3" C:\Program Files\AutoIt3\Include\Zip.au3 (211) : ==> The requested action with this object has failed.: $oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile).Items) $oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile)^ ERROR ->15:18:05 AutoIT3.exe ended.rc:1 +>15:18:06 AutoIt3Wrapper Finished >Exit code: 1 Time: 2.322
This post has been edited by Taek: 08 May 2009 - 11:22 PM
#145
Posted 19 May 2009 - 01:18 AM
Misiuu, on Jan 23 2009, 07:18 AM, said:
1. ttile: Compressed (zipped) folders error
content: Missing or empty zip file
2. ttile: Compressed (zipped) folders error
cannot create output file.
3. error: object referenced outside a "With" statement.
in case 2 first error windows, in the same time 'compressing...' titled window shows up but progress bar doesn't move
regards
B.
Did you ever find the answer to why this happens. I have seen it intermittently as well. I can run the sample program a couple of times and sometimes it will give the errors you mention. Other times it will work flawlessly. Any help would be appreciated. Thanks.
#146
Posted 01 June 2009 - 07:57 PM
Taek, on May 9 2009, 12:20 AM, said:
#include <Zip.au3> $pkg = @ScriptDir & "FileName" _Zip_UnzipAll($pkg & ".vts", @ScriptDir)
when I try this I just get a error in the SciTE editor
>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Administrator\Desktop\testing\data\unpack.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>15:18:04 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI) >Running AU3Check (1.54.14.0) from:C:\Program Files\AutoIt3 +>15:18:04 AU3Check ended.rc:0 >Running:(3.3.0.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\testing\data\unpack.au3" C:\Program Files\AutoIt3\Include\Zip.au3 (211) : ==> The requested action with this object has failed.: $oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile).Items) $oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile)^ ERROR ->15:18:05 AutoIT3.exe ended.rc:1 +>15:18:06 AutoIt3Wrapper Finished >Exit code: 1 Time: 2.322
excuse me for my late response
it has already been covered in the topic
rename the file in .zip add files or whatever and rename it back again
it's the only way :)
it takes less than a second more though :P
#149
Posted 18 June 2009 - 06:03 AM
Edit: Addition issue: I'm using _ZIP_UnZipAll function but it always displays "copying..." dialog (even flag 1 or 0).
This post has been edited by nguyenbason: 18 June 2009 - 07:03 AM
#150
Posted 18 June 2009 - 12:29 PM
I have another question. How can i display progress with percent of unziping process?
Something like:
;Create Progress bar ProgressOn("Processing file","1","2","","",16) ;Unzip the pack file to randomed folder name ProgressSet(_Zip_UnzipAll($FileOpen, $FolderPath)) ;Delete Processing bar ProgressOff()
Thanks
#151
Posted 18 June 2009 - 05:17 PM
rename the file and then rename it back again!
the window is shown automatically
just set the flag to show the window in the function call. Unfortunately the shell.application object isn't very "cusomizable" though... :(
btw.. take a look at the code :)
#152
Posted 20 June 2009 - 12:03 PM
torels, on Jun 18 2009, 11:17 PM, said:
rename the file and then rename it back again!
the window is shown automatically
just set the flag to show the window in the function call. Unfortunately the shell.application object isn't very "cusomizable" though... :(
btw.. take a look at the code :)
Thanks torels,
#154
Posted 01 September 2009 - 08:52 AM
Make sure the file is a Zip File and that it actually exists, otherwise create it.
The "Outside a With Problem" is given when the shell.application object is used incorrectly (which obviously depnds on using the UDF incorrectly)
cheers
#156
Posted 21 September 2009 - 07:10 PM
LarryDalooza, on 21 September 2009 - 09:36 AM, said:
Lar.
Just a follow up... my problem was elsewhere... I only read about possible problems with zip and ntfs.
Lar
#158
Posted 10 November 2009 - 12:59 PM
savain, on 04 November 2009 - 04:25 AM, said:
it's something about waiting... try adding a sleep or something. I havn't got much time to work on the udf (or actually be active on the forums right now so for the moment try and work it out yourself :)
regards
#160
Posted 11 November 2009 - 10:39 PM
This is a great UDF, but it has caused me a great deal of frustration until I found what was wrong with it...
I have included it in one of my scripts and it worked as a charm when I was running the script from the editor. But when compiled it - the nightmare began... :'(
My script had an option to accept some command line parameters (nothing to do with ZIPs) and it kept giving me the "-1 Error - Array used..." when executed with any parameter.
I spent some time and found 3 lines of code in the beginning of your UDF that SHOULD NOT BE THERE!
If this is supposed to be an UDF why the **** it has an executable code that deals with command line parameters outside a function ???
And PLEASE, take some time to fix your function descriptions! They are almost all messed up. They claim:
Return Value(s): On Success - 0
On Failure - sets @error 1~3
In fact it is:
Return Value(s): On Success - 1
On Failure - 0 and sets @error 1~3
And this is not the only mistake I found.
PLEASE, go through your functions, check their return and error values and fix the descriptions!

Sign In
Register
Help


MultiQuote