Sample code for 30+ languages & platforms
AutoIt

Transition from Imap.FetchSequence to Imap.FetchRange

Provides instructions for replacing deprecated FetchSequence method calls with FetchRange.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oImap = ObjCreate("Chilkat.Imap")

; ...
; ...

Local $iStartSeqNum = 1
Local $iCount = 5

; ------------------------------------------------------------------------
; The FetchSequence method is deprecated:

Local $oBundleObj = $oImap.FetchSequence($iStartSeqNum,$iCount)
If ($oImap.LastMethodSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

; ------------------------------------------------------------------------
; Do the equivalent using FetchRange.
; Your application creates a new, empty EmailBundle object which is passed 
; in the last argument and filled upon success.

Local $bHeadersOnly = False

$oBundleOut = ObjCreate("Chilkat.EmailBundle")
$bSuccess = $oImap.FetchRange($bHeadersOnly,$iStartSeqNum,$iCount,$oBundleOut)
If ($bSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf