AutoIt Forums: ZIP.au3 UDF in pure AutoIt - AutoIt Forums

Jump to content

  • (8 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

ZIP.au3 UDF in pure AutoIt Rate Topic: ***** 3 Votes

#141 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 23 March 2009 - 09:43 AM

The udf wasn't working!

it was some code I had put in the udf for testing purposes that stopped everything else but now it works

I apologize for the problems this created
0

#142 User is offline   pDanil2006 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 11
  • Joined: 06-January 09
  • Location:Russia

Posted 30 March 2009 - 07:50 AM

Hello!

Can I add a file in archive with password protection?

Thanks!
0

#143 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 01 April 2009 - 12:13 PM

I actually never tried it... I don't know.
Try it and let us know :P
0

#144 User is offline   Taek 

  • Newbie
  • Group: Full Members
  • Posts: 8
  • Joined: 07-May 09
  • Gender:Male
  • Location:Concord, California, U.S.

Posted 08 May 2009 - 11:20 PM

I know this is a fairly old topic but i have a a request, is there anyway to force this to extract whatever .ext the person uses with the zip file..

[ code='text' ]    ( Popup )
#include <Zip.au3> $pkg = @ScriptDir & "FileName" _Zip_UnzipAll($pkg & ".vts", @ScriptDir)


when I try this I just get a error in the SciTE editor
[ code='text' ]    ( Popup )
>"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

0

#145 User is offline   pootie tang 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 38
  • Joined: 20-May 06

Posted 19 May 2009 - 01:18 AM

View PostMisiuu, on Jan 23 2009, 07:18 AM, said:

Sometimes I get also following window messages. They occur randomly even if the same steps were repeated in application:

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.
0

#146 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 01 June 2009 - 07:57 PM

View PostTaek, on May 9 2009, 12:20 AM, said:

I know this is a fairly old topic but i have a a request, is there anyway to force this to extract whatever .ext the person uses with the zip file..

[ code='text' ]    ( Popup )
#include <Zip.au3> $pkg = @ScriptDir & "FileName" _Zip_UnzipAll($pkg & ".vts", @ScriptDir)


when I try this I just get a error in the SciTE editor
[ code='text' ]    ( Popup )
>"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
0

#147 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 05 June 2009 - 07:40 PM

huh that's interesting :P
0

#148 User is offline   nguyenbason 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 109
  • Joined: 13-May 09
  • Location:Viet Nam

Posted 18 June 2009 - 02:23 AM

What a great UDF. Thanks :P
0

#149 User is offline   nguyenbason 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 109
  • Joined: 13-May 09
  • Location:Viet Nam

Posted 18 June 2009 - 06:03 AM

Cannot open custom extension file? Eg: i want to use FileName.son instead FileName.zip and got error.

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

0

#150 User is offline   nguyenbason 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 109
  • Joined: 13-May 09
  • Location:Viet Nam

Posted 18 June 2009 - 12:29 PM

Fixed by edit flag in function.
I have another question. How can i display progress with percent of unziping process?
Something like:
[ autoIt ]    ( Popup )
;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
0

#151 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 18 June 2009 - 05:17 PM

the extension problem has been covered 2 or three posts above yours!
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 :)
0

#152 User is offline   nguyenbason 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 109
  • Joined: 13-May 09
  • Location:Viet Nam

Posted 20 June 2009 - 12:03 PM

View Posttorels, on Jun 18 2009, 11:17 PM, said:

the extension problem has been covered 2 or three posts above yours!
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,
0

#153 User is offline   marian001 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 10
  • Joined: 17-January 09
  • Location:Prague, Czech republic

Posted 05 August 2009 - 02:28 AM

I am getting "Object referenced outside a "With" statement." error quite often (on Vista Ent). Any idea/workaround/...? I need some reliable zip solution...

Marian
0

#154 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 01 September 2009 - 08:52 AM

take a look at the example script in the first post, it works correctly.
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
0

#155 User is offline   LarryDalooza 

  • Schmember
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 783
  • Joined: 11-October 07

Posted 21 September 2009 - 03:36 PM

Has zipping NTFS compressed files already been addressed? There is something broken with Windows zipping NTFS compressed files. They don't unzip well. I would suggest adding an NTFS decompress of the files before zipping them.

Lar.
0

#156 User is offline   LarryDalooza 

  • Schmember
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 783
  • Joined: 11-October 07

Posted 21 September 2009 - 07:10 PM

View PostLarryDalooza, on 21 September 2009 - 09:36 AM, said:

Has zipping NTFS compressed files already been addressed? There is something broken with Windows zipping NTFS compressed files. They don't unzip well. I would suggest adding an NTFS decompress of the files before zipping them.

Lar.

Just a follow up... my problem was elsewhere... I only read about possible problems with zip and ntfs.

Lar
0

#157 User is offline   savain 

  • Newbie
  • Group: Members
  • Posts: 1
  • Joined: 26-April 09

Posted 04 November 2009 - 04:25 AM

Hi, the zip-function doesn't work correct - not all files were zipped (eg. no 2megs edb-files)!
0

#158 User is offline   torels 

  • I Hacked 127.0.0.1! :D
  • PipPipPipPipPip
  • Group: Full Members
  • Posts: 666
  • Joined: 17-January 08
  • Location:Rome

Posted 10 November 2009 - 12:59 PM

View Postsavain, on 04 November 2009 - 04:25 AM, said:

Hi, the zip-function doesn't work correct - not all files were zipped (eg. no 2megs edb-files)!

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
0

#159 User is offline   dstambaugh 

  • Newbie
  • Group: Full Members
  • Posts: 5
  • Joined: 30-September 08

Posted 10 November 2009 - 04:16 PM

Dumb question.....where can I download the latest code for this project? Looks awesome! thx
0

#160 User is offline   dv8 

  • Advanced Member
  • PipPip
  • Group: Full Members
  • Posts: 120
  • Joined: 03-February 06
  • Location:Bulgaria

Posted 11 November 2009 - 10:39 PM

Hi Torels,
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!

[ autoIt ]    ( Popup )
If UBound($CMDLine) > 1 Then        If $CMDLine[1] <> "" Then _Zip_VirtualZipOpen() EndIf


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

  • (8 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users