Rico.JohnnY 0 Posted September 7, 2004 i.e. there is a exe file called autoit.exe and i call it with "autoit.exe /s:abc" from the command prompt .. so within the script...how can i get the /s:abc parameter for use? any suggestion appreciated Share this post Link to post Share on other sites
Jos 2,165 Posted September 7, 2004 (edited) i.e. there is a exe file called autoit.exe and i call it with "autoit.exe /s:abc" from the command prompt .. so within the script...how can i get the /s:abc parameter for use? any suggestion appreciated <{POST_SNAPBACK}>If you want to specify commandline parameters and work with them inside an autoit script then look for $CMDLINE in the helpfile 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... Edited September 7, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
tuape 0 Posted September 7, 2004 i.e. there is a exe file called autoit.exe and i call it with "autoit.exe /s:abc" from the command prompt .. so within the script...how can i get the /s:abc parameter for use? any suggestion appreciated <{POST_SNAPBACK}>Take a look at $CmdLine array in Online documentation Share this post Link to post Share on other sites
Rico.JohnnY 0 Posted September 7, 2004 thx in advance for your reply...i get to try it now Share this post Link to post Share on other sites
Coffee 0 Posted September 7, 2004 also good idea to name it to a different file names, to call autoit.exe with autoit.exe can cause some bad mojo. Share this post Link to post Share on other sites