_TyIzaeL_ Posted January 20, 2006 Share Posted January 20, 2006 I am working on a simple script to launch a particular program (Folding@Home) and have it run in the background. I am wondering, how do I add flags that will be sent to the program? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 20, 2006 Moderators Share Posted January 20, 2006 I am working on a simple script to launch a particular program (Folding@Home) and have it run in the background. I am wondering, how do I add flags that will be sent to the program?What do you mean by 'flags'? In AutoIT a flag determines how a function carries out it's operation. Link to comment Share on other sites More sharing options...
CyberSlug Posted January 20, 2006 Share Posted January 20, 2006 ...Might mean command line arguments; if so, look for $CmdLine in the help file Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
_TyIzaeL_ Posted January 20, 2006 Author Share Posted January 20, 2006 Command Line Parameters The special array $CmdLine is initialized with the command line parameters passed in to your AutoIt script. Note the scriptname is not classed as a parameter; get this information with @ScriptName instead. A parameter that contains spaces must be surrounded by "double quotes". Compiled scripts accept command line parameters in the same way. $CmdLine[0]is number of parameters $CmdLine[1] is param 1 (after the script name) $CmdLine[2] is param 2 etc ... $CmdLine[$CmdLine[0]] is one way to get the last parameter... So if your script is run like this: AutoIt3.exe myscript.au3 param1 "this is another param" $CmdLine[0] equals... 2 $CmdLine[1] equals... param1 $CmdLine[2] equals... this is another param @ScriptName equals... myscript.au3 In addition to $CmdLine there is a variable called $CmdLineRaw that contains the entire command line unsplit, so for the above example: $CmdLineRaw equals... myscript.au3 param1 "this is another param"That's what the helpfile says, however, I don't understand how to use $CmdLine. Where/How do I add it to the script? Link to comment Share on other sites More sharing options...
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