Fergus Posted April 13, 2005 Posted April 13, 2005 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. :-)
Valik Posted April 13, 2005 Posted April 13, 2005 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.
Fergus Posted April 13, 2005 Author Posted April 13, 2005 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now