Thanks HotKeyIt for your suggestions.
About your suggestion concerning the switch construction, I've seen before asking for this implementation the post
[function] switch(case) demo, so I know thera are wrokarounds to have it, but I think that, even if it's just as effective as an internally coded function, it's look like DIY.
Not to say that a DIY solution is a bad one, but I think that an internally coded solution would made the AHK more readable.
For the For instruction, I think that when you speak about the 'While' instruction, you want to say that it ca be substitued to the 'For' one.
Also for readability (but not only), I'm not agree. If I took examples like
Quote:
For x = 1, 5, 12, 1245
or
Quote:
For y = "abc", "zkg", "rstdg"
, it's to indicate non progressives suites (1, 2, 3, 4, ...).
The example could have been : For x = 1, 1245, -4, 125, 32 to indicate that the suite of values to handle could be not progressive, but must be done in this order (1 in first, 1245 in second, ...).
Of course you can do that with a suite of If ... then If instructions, but I think it's more readable and efficient to be able to do it that way.
This improvements can be seen as cosmetic ones, but I think that the readability of the code is a good way to maintain it more efficiently.
(Sorry for the bad english...)