Sign in to follow this  
Followers 0
Fergus

$CmdLine is now a constant?

3 posts in this topic

I've previously had a loop which runs through the command line args and extracts any that conform to Foo=Value - these values being for the script itself. The rest of the args were passed on whatever application that was being run. I was setting CmdLine[$I] = "" when a named argument was found.

This has worked fine until I downloaded the latest version of AutoIt3 yesterday and then my RunAt script (which uses named arguments X and Y to run the application at a particular location) failed with "CmdLine[$I] = "" ^ERROR Cannot assign values to constants".

Is this intentional or a new bug?

Thanks.

:-)

Share this post


Link to post
Share on other sites



Its intentional. There is a new Const keyword to mark a variable as immutable. $CmdLine/$CmdLineRaw are implicitly Const now. If you want read/write versions, then copy the $CmdLine variable and use your new variable for processing.

Share this post


Link to post
Share on other sites

Const/not const, both ways make sense in their own way, lol. A version using my own $CmdLineArgs[] - already done. :-D

Thanks for the confirmation, Valik.

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