Jump to content

Recommended Posts

Posted (edited)

I've just start using AutoIt and I'm with a problem trying to pass a parameter to a script.

I'd like to do something like this:

[oracle@desv ~]$ vi teste.sh

[oracle@desv ~]$ chmod 777 teste.sh

[oracle@desv ~]$ ./teste.sh parameter1

parameter1

[oracle@desv ~]$ cat teste.sh

echo $1

[oracle@desv ~]$

If anyone can help me.

Edited by gpoli
Posted

$CmdLine[1] would be equivalent to $1.

Look up "Command Line Parameters" in the help file for more info.

Make sure $CmdLine[0] > 0 before referencing $CmdLine[1] or you'll get an Array boundary error.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

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
  • Recently Browsing   0 members

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