Sample code for 30+ languages & platforms
AutoIt

Transition from Imap.ThreadCmd to Imap.QueryThread

Provides instructions for replacing deprecated ThreadCmd method calls with QueryThread.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

$oImap = ObjCreate("Chilkat.Imap")

; ...
; ...

Local $sThreadAlg = "REFERENCES"
Local $sCharset = "UTF-8"
Local $searchCriteria = "SUBJECT a"
Local $bUid = True

; ------------------------------------------------------------------------
; The ThreadCmd method is deprecated:

Local $oJsonObj = $oImap.ThreadCmd($sThreadAlg,$sCharset,$searchCriteria,$bUid)
If ($oImap.LastMethodSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf

; ...
; ...

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

$oImap.SearchCharset = "UTF-8"

$oJson = ObjCreate("Chilkat.JsonObject")
$bSuccess = $oImap.QueryThread($sThreadAlg,$searchCriteria,$bUid,$oJson)
If ($bSuccess = False) Then
    ConsoleWrite($oImap.LastErrorText & @CRLF)
    Exit
EndIf