Wednesday, March 30, 2011

AutoIT Variable Explicit Declaration Is Not Required

AutoIt does not require the explicit declaration of variables. However, as a debugging measure it is wise to explicitly declare all variables used within a script. If you do not explicitly declare variables, it can become very difficult to find a mistyped variable name that may be causing your script to error on
execution. You should include the following in your scripts to require the explicit declaration of variables in order to avoid bugs:

Code:
Opt("MustDeclareVars", 1)

With this option enabled, all variables must now be explicitly declared using Global, Local, or Dim.

No comments:

Post a Comment