Post by bernisim » 19 Mar 2017, 13:47
The biggest pro of AHK vs AutoIT are shortcuts & hotstrings: very powerful and easy to use; if you need them, use AHK!
I use AHK script at work from 2-3 years: it completes my writing (handles more than 2000 shortcuts/hotstrings at an incredible speed with an incremental search while I type: a script made by other that I modified to my needs); I also have a new menu with different utilities I made and I love them,...but I think AHK language is easy only for very simple scripts: more deeper you go, more strange syntax come out.
So I fully agree that this is not good to learn programming for newbie: two mixed variable handling is very confusing ("" or %%; to declare an empty string var pippo="" is wrong meaning double " ; needs pippo :="" or pippo=); double Msgbox % syntax; other double commands syntax (loop, files,pattern... loop,pattern,... ), many duplicated expression If-versions (IfNotEqual equivalent to if var <> var2 or if var != var2), IfGreaterOrEqual , IfLessOrEqual, IfMsgBox (!)); declaration of variables not mandatory as default (source of many mistyping errors for newbie), different syntax for procedure & function, global variables access from inside a function needs an inside re-declaring, comma not always mandatory (loop, files = loop files), function name that doesn't want any space before the brace (don't gives error, simply consider it different, so program looks running ok, but don't make what you intended for...), unusual command output (StringSplit of %pippo% var -> result in %pippo0%,...); too many default parameters accepted (also in GUI commands) lead to cryptic examples from "fast" writer online; IF-command official help page report a series of rules & exception (braces, space after "if", One True Brace style, % rules); joining strings with spaces (no + or & ), default trim of spaces from start & end strings value (!); GUI commands with strange syntax (some parameters divided by comma, other by spaces, g- / v-labels referred without prefix,...).
All in all, I think that is more "educative" and simple for newbie to start from a compiled Pascal (e.g. Lazarus) that is a more "coherent", rigid and readable.
AHK is the kind of programming language that is very powerful, permits to do incredible things in few lines, but to write them sometime needs much time due to unexpected pitfalls...
The biggest pro of AHK vs AutoIT are shortcuts & hotstrings: very powerful and easy to use; if you need them, use AHK!
I use AHK script at work from 2-3 years: it completes my writing (handles more than 2000 shortcuts/hotstrings at an incredible speed with an incremental search while I type: a script made by other that I modified to my needs); I also have a new menu with different utilities I made and I love them,...but I think AHK language is easy only for very simple scripts: more deeper you go, more strange syntax come out.
So I fully agree that this is not good to learn programming for newbie: two mixed variable handling is very confusing ("" or %%; to declare an empty string var pippo="" is wrong meaning double " ; needs pippo :="" or pippo=); double Msgbox % syntax; other double commands syntax (loop, files,pattern... loop,pattern,... ), many duplicated expression If-versions (IfNotEqual equivalent to if var <> var2 or if var != var2), IfGreaterOrEqual , IfLessOrEqual, IfMsgBox (!)); declaration of variables not mandatory as default (source of many mistyping errors for newbie), different syntax for procedure & function, global variables access from inside a function needs an inside re-declaring, comma not always mandatory (loop, files = loop files), function name that doesn't want any space before the brace (don't gives error, simply consider it different, so program looks running ok, but don't make what you intended for...), unusual command output (StringSplit of %pippo% var -> result in %pippo0%,...); too many default parameters accepted (also in GUI commands) lead to cryptic examples from "fast" writer online; IF-command official help page report a series of rules & exception (braces, space after "if", One True Brace style, % rules); joining strings with spaces (no + or & ), default trim of spaces from start & end strings value (!); GUI commands with strange syntax (some parameters divided by comma, other by spaces, g- / v-labels referred without prefix,...).
All in all, I think that is more "educative" and simple for newbie to start from a compiled Pascal (e.g. Lazarus) that is a more "coherent", rigid and readable.
AHK is the kind of programming language that is very powerful, permits to do incredible things in few lines, but to write them sometime needs much time due to unexpected pitfalls...