Jump to content
Sign in to follow this  
gpoli

Pass paramete to a exe generated from a script

Recommended Posts

gpoli

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

Share this post


Link to post
Share on other sites
Skruge

$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]

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  

×