Sample code for 30+ languages & platforms
AutoIt Requires Chilkat v11.0.0+

Transition from Zip.AppendString2 to Zip.AddString

Provides instructions for replacing deprecated AppendString2 method calls with AddString.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oZip = ObjCreate("Chilkat.Zip")

;  ...
;  ...
Local $sPathInZip = "example.txt"
Local $sTextData = "This is a test"
Local $sCharset = "utf-8"

;  ------------------------------------------------------------------------
;  The AppendString method is deprecated:

Local $oEntryObj = $oZip.AppendString2($sPathInZip,$sTextData,$sCharset)
If ($oZip.LastMethodSuccess = False) Then
    ConsoleWrite($oZip.LastErrorText & @CRLF)
    Exit
EndIf

;  ...
;  ...

;  ------------------------------------------------------------------------
;  Do the equivalent using AddString.

;  Instead of returning the zip entry object, we just return success/failure.
$bSuccess = $oZip.AddString($sPathInZip,$sTextData,$sCharset)
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)