(AutoIt) Transition from Zip.GetEntryByIndex to Zip.EntryAt
Provides instructions for replacing deprecated GetEntryByIndex method calls with EntryAt. Note: This example requires Chilkat v11.0.0 or greater.
$oZip = ObjCreate("Chilkat.Zip")
; ...
; ...
Local $index = 15
; ------------------------------------------------------------------------
; The GetEntryByIndex method is deprecated:
Local $oEntryObj = $oZip.GetEntryByIndex($index)
If ($oZip.LastMethodSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; Do the equivalent using EntryAt.
; Your application creates a new, empty ZipEntry object which is passed
; in the last argument and filled upon success.
$oZe = ObjCreate("Chilkat.ZipEntry")
Local $bSuccess = $oZip.EntryAt($index,$oZe)
If ($bSuccess = False) Then
ConsoleWrite($oZip.LastErrorText & @CRLF)
Exit
EndIf
|