AutoIt
AutoIt
Transition from ZipEntry.NextEntry to ZipEntry.GetNext
Provides instructions for replacing deprecated NextEntry method calls with GetNext.Chilkat AutoIt Downloads
Local $bSuccess = False
; ------------------------------------------------------------------------
; The NextEntry method is deprecated.
; See below or code showing how to rewrite using EntryAt/GetNext
$oZip = ObjCreate("Chilkat.Zip")
$bSuccess = $oZip.OpenZip("qa_data/zips/xml_files.zip")
If ($bSuccess <> True) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
Local $oEntry = $oZip.FirstEntry()
If ($oZip.LastMethodSuccess = False) Then
ConsoleWrite("This zip archive is empty." & @CRLF)
Exit
EndIf
Local $bFinished = False
While $bFinished = False
If ($oEntry.IsDirectory = False) Then
ConsoleWrite($oEntry.FileName & @CRLF)
Else
ConsoleWrite("(directory) " & $oEntry.FileName & @CRLF)
EndIf
Local $oNext = $oEntry.NextEntry()
If ($oEntry.LastMethodSuccess = False) Then
$bFinished = True
EndIf
$oEntry = $oNext
Wend
$oZip.CloseZip
ConsoleWrite("----" & @CRLF)
; ------------------------------------------------------------------------
; Do the equivalent using EntryAt/GetNext.
$bSuccess = $oZip.OpenZip("qa_data/zips/xml_files.zip")
$oZe = ObjCreate("Chilkat.ZipEntry")
$oZip.EntryAt(0,$oZe)
Local $bEntryValid = True
While $bEntryValid = True
If ($oZe.IsDirectory = False) Then
ConsoleWrite($oZe.FileName & @CRLF)
Else
ConsoleWrite("(directory) " & $oZe.FileName & @CRLF)
EndIf
$bEntryValid = $oZe.GetNext()
Wend
$oZip.CloseZip