Jump to content

Beta Compile- didn't catch missing comma


Recommended Posts

This just keeps happening to me over and over (in different places, of course)

Beta & Full compiles are not catching errors like this

$Retval = ControlCommand($WindowTitleText, "" $ControlID, "GetCurrentSelection", "")

Note the missing comma before $ControlID

When I run with F5, I get a runtime error.

This just doens't make sense to me.

How can the compiler make an exe with this kind of error?

Link to comment
Share on other sites

  • Moderators

Try running Tidy before you compile anything.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Because the compiler is not an interpreter and it does not perform syntax checking on the script.

Wait a minute. The compiler has caught a lot of my errors, but not all of them.

This is what is confusing me.

Missing quotes are fatal, it doens't catch. Missing parens and commas are fatal- I think it catches these.

Link to comment
Share on other sites

  • Moderators

Well, I'll stick to what I said... You have to personally take responsibility for your code. Run Tidy / Au3Check personally before doing any compile, then you know first hand whether it is ready for compiling or not.

If I'm not mistaken, Beta Compile doesn't do an Au3Check.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Wait a minute. The compiler has caught a lot of my errors, but not all of them.

This is what is confusing me.

Missing quotes are fatal, it doens't catch. Missing parens and commas are fatal- I think it catches these.

This is a perfectly compilable "script":

ldsjf;alksjf;sldlks;jfl;ksjflk;asdjf;lsjf;lskdf

That, of course, is me mashing the keyboard. That "script" will not run. However, it will compile just fine because the compiler only validates the things it is interested in which is mostly just looking up FileInstall()'s and #include's since it has to seek out those extra files and incorporate them into the result. Everything else is ignored.

Edited by Valik
Link to comment
Share on other sites

This is a perfectly compilable "script":

ldsjf;alksjf;sldlks;jfl;ksjflk;asdjf;lsjf;lskdf

That, of course, is me mashing the keyboard. That "script" will not run. However, it will compile just fine because the compiler only validates the things it is interested in which is mostly just looking up FileInstall()'s and #include's since it has to seek out those extra files and incorporate them into the result. Everything else is ignored.

This is a shocking revelation to me.

But thanks for the tip!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...