Pick random element: Difference between revisions
Content added Content deleted
(→{{header|AutoHotkey}}: Updated) |
|||
Line 53: | Line 53: | ||
=={{header|AutoHotkey}}== |
=={{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" |
<lang AutoHotkey>list := "abc,def,gh,ijklmnop,hello,world" |
||
StringSplit list, list, `, |
StringSplit list, list, `, |