0

I am running AHK_L which I downloaded here:

http://l.autohotkey.net/AutoHotkey_L_Install.exe

By all accounts, running the following script should break standard AHK, but popup three Msgboxes in AHK_L.

arr := Array("b", "a", "c")
Loop, % arr.len()
   Msgbox, % arr[A_Index]

I get nothing; no error, and no Msgboxes. Why is this happening to me? AHK_L version 1.1.09.04.

More specifically, why does this forum post:

http://www.autohotkey.com/board/topic/45876-ahk-l-arrays/

... contain mostly commands that don't work? Are these from an older version of AHK_L? Etc.

Ben
  • 126
  • 7

1 Answers1

1

Here you go..

arr := Array("b", "a", "c")
Loop, % arr.MaxIndex()
{
    Msgbox, % arr[A_Index]
}
Robert Ilbrink
  • 7,738
  • 2
  • 22
  • 32
  • I wonder why my answer was voted down? I checked it and it works perfectly, so what is the reason? You can vote things down but please give a reason, so we can all learn! – Robert Ilbrink Mar 30 '13 at 09:51
  • Not sure, I didn't vote it down (just voted it up). However, I might ask if you could explain why that works, but the example from the AHK forums doesn't? Or even better, point me to a doc site that has Array methods that actually work (since I don't seem able to use join or others either). – Ben Apr 01 '13 at 17:49
  • Actually, I just realized that the posting I was looking at is an *extension* to AHK_L, not describing built in features. My mistake. – Ben Apr 01 '13 at 18:19