Somewhere out there is a UDF lib <AssocArrays.au3>
Autoit v3.3.8.1
Unless I am doing something really stupid, it has a bug. Here is the repro, does anyone have a fix?
I've attached the lib, it doesn't show a version number.
#include <AssocArrays.au3>
#include <ButtonConstants.au3>
Global $consts
AssocArrayCreate($consts,1)
AssocArrayAssign($consts,'Left',$BS_LEFT)
AssocArrayAssign($consts,'Right',$BS_RIGHT)
AssocArrayAssign($consts,'Bottom',$BS_BOTTOM)
AssocArrayAssign($consts,'Center',$BS_CENTER)
AssocArrayAssign($consts,'DefPushButton',$BS_DEFPUSHBUTTON)
AssocArrayAssign($consts,'MultiLine',$BS_MULTILINE)
AssocArrayAssign($consts,'Top',$BS_TOP)
AssocArrayAssign($consts,'VCenter',$BS_VCENTER)
AssocArrayAssign($consts,'Icon',$BS_ICON)
AssocArrayAssign($consts,'Bitmap',$BS_BITMAP)
AssocArrayAssign($consts,'Flat',$BS_FLAT)
AssocArrayAssign($consts,'Notify',$BS_NOTIFY); NOTE: Repeating this line will make it exist
Inspect('Notify'); Says not exist, unexpected!
Inspect('Flat');Exists
Inspect('Top');Exists
Func Inspect($test)
If Not AssocArrayExists($consts,$test) Then
MsgBox(0,$test,'Does not exist')
Else
MsgBox(0,$test,'Does exist')
EndIf
EndFunc
AssocArrays.au3