Jump to content

ZIP.au3 UDF in pure AutoIt


torels
 Share

Recommended Posts

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

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

I actually never tried it... I don't know.

Try it and let us know :D

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

  • 1 month later...

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

#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
Edited by Taek
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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

#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 :party:

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

huh that's interesting :D

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

  • 2 weeks later...

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

Edited by nguyenbason
UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

Fixed by edit flag in function.

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

UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

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... :D

btw.. take a look at the code :D

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

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... :D

btw.. take a look at the code :D

Thanks torels,

UnderWorldVN- Just play the way you like it
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

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

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

  • 3 weeks later...

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

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

  • 1 month later...

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

Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Link to comment
Share on other sites

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!

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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...