HashTable is an improvement on storing items in AutoHotkey Objects.
With HashTable you can
- store any string key without losing access to HashTable’s methods
- prevent string keys from being case-folded
- prevent floating-point keys from being indexed by their current string representation instead of their value
Design contains the reasons for the design decisions.
HashTable is compatible with AutoHotkey v1.
HashTable.ahk must be placed in a library directory.
HashTable’s constructor accepts items as Arrays containing a key and a value, in that order.
HashTable supports the following methods:
Get(Key)
Set(Key, Value)
Get(Key)
reads the value associated with a key.
Set(Key, Value)
writes the value associated with a key.
HashTable also supports the following interfaces from Object:
Delete(Key)
Count()
_NewEnum()
HasKey(Key)
Clone()
HashTable will throw an exception when attempting to get or delete a nonexistent key.