Anonymous user
Pick random element: Difference between revisions
→{{header|AutoHotkey}}: Updated
(→{{header|AutoHotkey}}: Updated) |
|||
Line 53:
=={{header|AutoHotkey}}==
; True Arrays
{{works with|AutoHotkey_L}}
<lang AHK>list := ["abc", "def", "gh", "ijklmnop", "hello", "world"]
Random, randint, 1, % list.MaxIndex()
MsgBox % List[randint]</lang>
; Pseudo-Arrays
{{works with|AutoHotkey_Basic}}
<lang AutoHotkey>list := "abc,def,gh,ijklmnop,hello,world"
StringSplit list, list, `,
|