Sign in to follow this  
Followers 0
Guest ano_admin

Dos Parameter

3 posts in this topic

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

Help...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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..

E.G.

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

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  
Followers 0