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

Get the QR Code Capabilities of the Chilkat Version in Use

See more QR Code Examples

Demonstrates the capabilities operation, which describes what the installed version of Chilkat can do: the range of QR versions, the error-correction levels, the operations, the image formats and the limits. A program can check for a feature here instead of testing for a Chilkat version number. The request can be an empty JSON object.

Chilkat AutoIt Downloads

AutoIt
Local $bSuccess = False

;  This example requires the Chilkat API to have been previously unlocked.
;  See Global Unlock Sample for sample code.

$oJson = ObjCreate("Chilkat.JsonObject")
$oFmt = ObjCreate("Chilkat.Formats")
$oJsonOut = ObjCreate("Chilkat.JsonObject")
$bSuccess = $oFmt.QrCode("capabilities",$oJson,$oJsonOut)
If ($bSuccess = False) Then
    ConsoleWrite($oFmt.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite("Chilkat version: " & $oJsonOut.StringOf("productVersion") & @CRLF)
ConsoleWrite("symbology: " & $oJsonOut.StringOf("symbologies[0].id") & @CRLF)
ConsoleWrite("QR versions: " & $oJsonOut.IntOf("symbologies[0].encoding.version.min") & " to " & $oJsonOut.IntOf("symbologies[0].encoding.version.max") & @CRLF)
ConsoleWrite("structured append, most symbols: " & $oJsonOut.IntOf("symbologies[0].structuredAppend.maxSymbols") & @CRLF)

Local $i
Local $iN
$iN = $oJsonOut.SizeOfArray("symbologies[0].encoding.errorCorrection")
For $i = 0 To $iN - 1
    $oJsonOut.I = $i
    ConsoleWrite("error correction: " & $oJsonOut.StringOf("symbologies[0].encoding.errorCorrection[i]") & @CRLF)
Next

;  The operations this version implements.
$iN = $oJsonOut.SizeOfArray("operations")
For $i = 0 To $iN - 1
    $oJsonOut.I = $i
    If ($oJsonOut.BoolOf("operations[i].available") = True) Then
        ConsoleWrite("operation: " & $oJsonOut.StringOf("operations[i].name") & @CRLF)
    EndIf

Next

$iN = $oJsonOut.SizeOfArray("imageFormats.output")
For $i = 0 To $iN - 1
    $oJsonOut.I = $i
    ConsoleWrite("image format: " & $oJsonOut.StringOf("imageFormats.output[i]") & @CRLF)
Next

ConsoleWrite("default timeout: " & $oJsonOut.IntOf("limits.timeoutMs.default") & " ms" & @CRLF)
ConsoleWrite("default largest image: " & $oJsonOut.IntOf("limits.maxPixels.default") & " pixels" & @CRLF)

;  Sample output:

;  Chilkat version: 11.7.0
;  symbology: qr
;  QR versions: 1 to 40
;  structured append, most symbols: 16
;  error correction: auto
;  error correction: L
;  error correction: M
;  error correction: Q
;  error correction: H
;  operation: generate
;  operation: measure
;  operation: validate
;  operation: capabilities
;  image format: png
;  image format: svg
;  default timeout: 10000 ms
;  default largest image: 16777216 pixels