Skip to content

Instantly share code, notes, and snippets.

@grey-code
Last active December 15, 2015 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grey-code/5322888 to your computer and use it in GitHub Desktop.
Save grey-code/5322888 to your computer and use it in GitHub Desktop.
AutoHotkey: range()
range(stop, start:=0, step:=1) {
r := []
Loop
v := start+step*(A_Index-1)
, r[v] := v
until (stop<0 ? v<=stop-step : v>=stop-step)
return r
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment