Sample code for 30+ languages & platforms
AutoIt

Transition from Zip.AppendDataEncoded to Zip.AddEncoded

Provides instructions for replacing deprecated AppendDataEncoded method calls with AddEncoded.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oZip = ObjCreate("Chilkat.Zip")

; ...
; ...
Local $sPathInZip = "example.dat"
Local $sEncoding = "base64"
Local $sEncData = "... BASE64 DATA ..."

; ------------------------------------------------------------------------
; The AppendDataEncoded method is deprecated:

Local $oEntryObj = $oZip.AppendDataEncoded($sPathInZip,$sEncoding,$sEncData)
If ($oZip.LastMethodSuccess = False) Then
    ConsoleWrite($oZip.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using AddEncoded.

; Instead of returning the zip entry object, we just return success/failure.
$bSuccess = $oZip.AddEncoded($sPathInZip,$sEncoding,$sEncData)
If ($bSuccess = False) Then
    ConsoleWrite($oZip.LastErrorText & @CRLF)
    Exit
EndIf

; Do the following if you need the zip entry object for what was just appended.
; The newly appended entry is the last one.
$oZe = ObjCreate("Chilkat.ZipEntry")
Local $index = $oZip.NumEntries - 1
$oZip.EntryAt($index,$oZe)