AutoIT‎ > ‎

Using a Scripting Dictionary object in AutoIT

posted Feb 19, 2014, 2:33 PM by Chris G   [ updated Mar 20, 2014, 11:28 AM ]
AutoIT Code Sample - using a Scripting Dictionary object in AutoIT to store key-value pairs:

;===============================================================================
; Description:		Using a Scripting Dictionary object
; Author(s):		Videre Research, LLC - http://videreresearch.com
;===============================================================================

$oDictionary = ObjCreate("Scripting.Dictionary")
$oDictionary.ADD("One", "Same") $oDictionary.ADD("Two", "Car") $oDictionary.ADD("Three", "House") $oDictionary.ADD("Four", "Boat")

;List all keys For $vKey In $oDictionary ConsoleWrite("-> " & $vKey & " - " & $oDictionary.Item($vKey) & @CRLF) Next If $oDictionary.Exists('Two') Then     MsgBox(0x0, 'Item Two', $oDictionary.Item('Two'), 2) EndIf
;Delete all keys For $vKey In $oDictionary     $oDictionary.Remove($vKey) Next
Comments