Sign in to follow this  
Followers 0
mvidal

problems with run and variables

6 posts in this topic

Why wont run("$CmdLine[1]") work? autoit tries to run the literal text $CMDLine[1]. I also tried without the quotes.

Share this post


Link to post
Share on other sites



Why wont run("$CmdLine[1]") work? autoit tries to run the literal text $CMDLine[1]. I also tried without the quotes.

Try:

run($CmdLine[1])

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

I get an error with run($CmdLine[1])

I know the command line is ok because MsgBox(4096, $CmdLine[1], $CmdLine[1], 20) shows the correct text.

I get AutoIt Error

Line 0 (file "c:\path\CompiledAutoItScript.exe)"):

run($CmdLine[1])

Error: Unable to execute the external program.

Share this post


Link to post
Share on other sites

Try

Run('"' & $CmdLine[1] & '"')

Also double check the path of the file to make sure it exists.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Surely $CmdLine[1] is just a command line parameter to your program and not a program in its own right.

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

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