I
Tomorrow or after tomorrow, "Quick Macros" (quickmacros.com) will be on bitsdujour.com, half-price, 20 bucks instead of 40.
So let's have a look on their screenshots since they are highly instructive because they illustrate why at the end of the day, it's not really in your interest of having some (even rather very good) proprietary macro tool.
Those screenshots clearly indicate that such (more elaborate = the better ones of them) tool come with real scripts BUT permit you to "click together" the respective command lines (and they group them together in "related command groups") so that you don't "have" to "learn" those: They simply spare you to look into the command list and then apply the syntax of the command in question correctly, whilst in AHK, you have to "look them up", AND then often have a real chance to do lotsa wrong: with or without %%? with or without parentheses? (in function-style AHK commands) with how many "empty" commata? (in "command-style" AHK commands, e.g. dothis, somevalue,,,someothervalue,,andsomeothervalueagain).
As you can see from this example, the problems with AHK lie in its "historically grown-up" chaos syntax, which would be perfectly avoidable, had the developers NON-programmers in mind, but no, they have it their way, as some sort of a combined IQ-and-physical-and-psychological-resilience test: Instead of making it "available to everyone", they insist on it "staying select", for fellow programmers (but as you will have grasped before, I'm not on their side with this policy).
On the other hand, you will need the "same" commands (in fact, more or less the same sub-group of all of those available commands, except for some rare exceptional cases), again and again, so you will be interested in copying those commands into some subset of your own, with your own comments "what is what", so as not being forced to look up the "how many commata in this command-style command or that", every single time.
The big advantage of tools like AHK (or AI) is certainly not the savings of 20 (or 40) bucks, but the fact that you'll quickly write quite large scripts, once you'll have set up such a "tamed subset" of commands, instead of "clicking your script together, line by line"... and there are many such commands in AHK, even for very special cases, incl. low-level Win access things.
II
This being said, some things are really, really weird in AHK; just read the (again, not totally helpful) help on
"Variables and Expressions"
http://www.autohotkey.com/docs/Variables.htm or especially on
"if (expression)"
http://www.autohotkey.com/docs/commands/IfExpression.htm :
Where you look out for something more obvious, it's where they further blur things.
If fact, it's very simple (my explanation might be a simplification, but which will get you along here, and that is the relevant aspect here):
abc = 120 ; numerical variable assignment
xyz := "blahblah" ; non-numerical variable assignment
if abc = 120 ; numerical comparison
if ( xyz = "blahblah" ) ; non-numerical comparison
and
if abc = 1
do this
and go on in your script
and
if abc = 1
{
do this
do that ; more than one command line or even complicated substructures here
}
go on with your script
(In the above example, if you forget the braces, the "do that" line will be executed anyway, independently of abc being 1 or whatever; that's a common mistake in a "just 2 lines after an if" structure.)
As for numerical comparisons
if a = 45
you could write them in the form
if ( a = 45 )
, too, but why should you, since you'll use such numerical comparisons (and also for true/false/status variables/toggles = 1/0) again and again, it's just very important to always remember this style cannot be applied to non-numerical comparisons.
III
As said above, it's these totally unnecessary syntax probs in AHK that make the day for click-together-tools like Quick Macros, and that's why it's important, in AHK, to very early adopt some consistent but visually easy (= no parentheses but where they are needed) programming style (nitpickers will replace "programming" by "scripting" individually, please).
And make plenty of use of
msgbox, yes; (= yes, this part of the script has been attained) for structural probs, or even use
msgbox, yes1
msgbox, yes2 ; etc. for checking several possible probs at once, and of
msgbox, %nameofvariabletobechecked% ; whenever it's not entirely certain (yet) your script has properly assigned the variable in question.
At the end of the day, it's the STRUCTURAL possibilities of macro languages which will give you so many new ways to ease up your work, and those you will encounter in click-it-all-together tools as well - they cannot help you with structure, but only with the syntax of the respective single commands - and that makes their appeal:
They enormously help you within those very first 3 weeks in macroing, but afterwards they more or less are an obstacle to further progress - and even if they allow for your real scripting there, alternatively to just clicking-together, you'll be stuck then with their respective, proprietary command syntax...
from which consideration ensues that some tool like "Quick Macros" but which entirely relied upon AHK would be an enormously useful thing, for the AHK beginner... (and for the developer of such a tool if he sold it without the usual 30 days trial period...)