Jump to content


Photo

Use of command line vars in expressions 'kludgy'.


  • Please log in to reply
8 replies to this topic

#1 dmg

dmg
  • Members
  • 1752 posts

Posted 29 May 2012 - 01:25 AM

<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=1&t=86937">viewtopic.php?f=1&t=86937</a><!-- l -->

This is a logical mess, and it makes using these variables unnecessarily difficult! I propose the easiest way to fix this is naming them something other than integers, ie A_0, A_1, A_2, etc. This could be done along side the current names to prevent breaking existing scripts while letting new scripts use the new scheme.

#2 dmg

dmg
  • Members
  • 1752 posts

Posted 29 May 2012 - 01:47 AM

I apologize if this is in the wrong forum section, but I personally think of this as a bug, and not merely a suggestion.

#3 VxE

VxE
  • Fellows
  • 3511 posts

Posted 29 May 2012 - 08:34 AM

+1.

For AHK-L, the following code will copy the script parameters into a super-global array:
Global A_ := []
Loop % A_[0] := %FALSE%
	A_[A_Index] := %A_Index%