Jump to content

Dos Parameter


Guest ano_admin
 Share

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

Help...

Link to comment
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..

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
Link to comment
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
 Share

  • Recently Browsing   0 members

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