Jump to content
Sign in to follow this  
Guest ano_admin

Dos Parameter

Recommended Posts

Guest ano_admin

Hi all,

I found AutoIT and can use it really good in my enviroment.

But I have now a big question and hadn't found in the examples a solution.

Is there a way to make something like parameters?

for example: i have a script called "runprg" and want to write something like that:


C:\runprg notepad


and then notepad starts.

I need this, cause I don't want to write a dozens of scripts for the dozens of programms and need that for another "batchjob"

I found only a way with the inputbox() and this isnt the thing I need


Share this post

Link to post
Share on other sites

The array $CmdLine contains the command arguments:

$CmdLine[0] contains the number of arguments passed, $CmdLine[1] , $CmdLine[2] , $CmdLine[3] , $CmdLine[n] contains the arguments..


AutoitScript.exe 1 2 3 "4 5 6" Hello

$CmdLine[0] will be 5

$CmdLine[1] will be 1

$CmdLine[2] will be 2

$CmdLine[3] will be 3

$CmdLine[4] will be 4 5 6

$CmdLine[5] will be Hello

Edited by ezzetabi

Share this post

Link to post
Share on other sites
Guest ano_admin

hehe... that's not only easy, that's great!

thx alot! :D

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.