Sign in to follow this  
Followers 0
cappy2112

Beta Compile- didn't catch missing comma

7 posts in this topic

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?

Share this post


Link to post
Share on other sites



Try running Tidy before you compile anything.


[center]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.[/center]

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.


[center]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.[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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!

Share this post


Link to post
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
Sign in to follow this  
Followers 0