Jump to content

Recommended Posts

Posted

Flags for CopyHere method aren't working prior win7

Which flags specifically? If you're referring to that 'Compressing...' dialog from the other thread... As I said there, I believe that dialog must be created by the zipfldr.dll library, not by the shell. As such, it wouldn't be affected by any flags, specifcally flag = 4, passed to the CopyHere method.
Posted (edited)

Which flags specifically? If you're referring to that 'Compressing...' dialog from the other thread... As I said there, I believe that dialog must be created by the zipfldr.dll library, not by the shell. As such, it wouldn't be affected by any flags, specifcally flag = 4, passed to the CopyHere method.

None of the flags while unziping. XP SP3 for example.

(zipfldr.dll from Vista above no longer have dialogs within (as a resource). I don't know if that means anything.)

Edited by trancexx

♡♡♡

.

eMyvnE

  • Moderators
Posted

wraithdu,

New version looks good so far. :blink:

For interest, I am now getting the "Compressing" dialog every time, regardless of the flag setting, although if I understand you and trancexx correctly that is not surprising.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

Yep, for longer operations you'll see the 'Compressing...' dialog. I suspect it's from zipfldr.dll, so the CopyHere flags can't control it. You could check by opening zipfldr.dll with ResHacker and check out the included dialogs. I only have Win7 for testing, unless I boot up a VM (yawn...), so I don't have that dialog any more.

Posted

Well, yes... what do you want me to do about it? It's well known that the zipfldr library has to be installed for this UDF to be useful. Who's still using Win2k anyway?

  • Moderators
Posted

wraithdu,

My Vista zipfldr.dll does not seem to have a dialogs within according to ResHacker, so heaven knows where the dialog is coming from. ;)

I have got it reduced to a very brief "flash" with this:

#include "Zip.au3"

AdlibRegister("Hider", 10)

$sZipFile = @ScriptDir & "\MyZip.zip"

$sRet = _Zip_Create(@ScriptDir & "\MyZip.zip", 1)
If $sRet <> $sZipFile Then Exit

$iRet = _Zip_AddItem($sZipFile, "My_Folder")
ConsoleWrite($iRet & @CRLF)

Func Hider()
    If BitAnd(WinGetState("Compressing"), 2) = 2 Then
        WinSetState("Compressing", "", @SW_HIDE)
        AdlibUnRegister("Hider")
    EndIf
EndFunc

On a positive note, the UDF is still working fine for me so far - very stable. :blink:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

Huh, tricky little dialog indeed. I would do something if I could, but I think it's beyond a user's control of the zipfldr library. Shame really, it has potential if MS had fleshed it out a bit more. It could use some compression settings as well. But it does well for my automated XYplorer updater script.

Posted

I have not tested this against network paths for destinations. Perhaps next week I'll get an opportunity.

In the meantime, if you can mount your network paths as local drives, you should be able to use the UDF as normal.

Posted

Great Work!

Just started working with this code today, and it seems like it's going to do the job. One small item.

Error 4 returned from _Zip_AddItem() indicates "4 - ZIP file does not exist". That ran me around for a while until I realized it was actually looking at $sFileName and not $sZipFile. Just a thought.

Thanks again. This is going to be good.

Posted

Yeah, read the headers for what the error message means and fix the problem. (It means the zipfldr library is not installed or is broken on your computer. Try 'regsvr32 zipfldr.dll'.)

  • 1 month later...
Posted (edited)

I wrote and tested this on Win7. You're going to have to provide considerably more information than that.

What information would you like?

I am running the lastest autoIT non-beta, the latest SciTE.

Windows 7 Professional.

The following script never displays "It worked!"...it just hangs at the until I stated:

#include "zip.au3"

$ZipFileFullPath = @ScriptDir & "\test.zip"
$FolderFullPath = @ScriptDir & "\test\"


$Zip = _Zip_Create($ZipFileFullPath, 1)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') :(' & @min & ':' & @sec & ':' & @msec & ') $Zip = ' & $Zip & '   :   Error code: ' & @error & '    Extended code: ' & @extended  & @crlf) ;### Debug Console


$Test = _Zip_AddItem($Zip, $FolderFullPath)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') :(' & @min & ':' & @sec & ':' & @msec & ') $Test = ' & $Test & '   :   Error code: ' & @error & '    Extended code: ' & @extended  & @crlf) ;### Debug Console
Msgbox(0,0,"It worked!")

the folder "test" just has a bunch of random .txt files in it. The zip is created, all the files get zipped...everything works, but it never returns out of the _AddItem function..it gets hung up.

Here is the output (Note the 2nd debug never shows, as its still hung up.)

@@ Debug(8) :(40:44:783) $Zip = C:\Users\Brian\Desktop\ZipSucks\test.zip : Error code: 0 Extended code: 0

Edited by ParoXsitiC
Posted (edited)

Thanks. See the first post for the fix. Had to do with your trailing \ in the folder path, and me not removing it.

Edited by wraithdu
Posted (edited)

Hi i'm using the below script & its creating the zip, but its not inserting the phonetree.csv into the zip file.. the zip file is always blank..

Any ideas why this is happening?

#include <_Zip.au3>
Global $sZipFile=@ScriptDir & "\phonetree.zip"
Global $sFileName=@ScriptDir & "\phonetree.csv"
Global $sDestDir="\"
Global $iFlag=77

;create the phonetree.zip
_Zip_Create("\phonetree.zip",1)

;Then to add phonetree.csv to the zip

_Zip_AddItem($sZipFile, $sFileName, $sDestDir, $iFlag)
Edited by bb01

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
  • Recently Browsing   0 members

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