Jump to content

Recommended Posts

Posted

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.

:-)

Posted

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.

Posted

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.

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
  • Recently Browsing   0 members

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