Sign in to follow this  
Followers 0
whitta

variable as input to run command

4 posts in this topic

Hi,

I think that I should be able to do this:

Dim $ProgramName = "Notepad.exe"

run($ProgramName, "c:\Windows\")

Am I way off? I get an error that says that seems to indicate that Notepad.exe did not replae $ProgramName.

Could not find a reference to variables in calls to functions. Probably looking in the wrong place.

Thanks for your help.

Tim

Share this post


Link to post
Share on other sites



that worked on my win xp ( autoit 3.2 )

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks for the check, Valuater.

I did not want to run Notepad, but another program. I finally got it to work if the directory to the program is included in the XP path environment variable.

Should have checked some more before wasting bandwidth.

Thanks again.

Tim

Share this post


Link to post
Share on other sites

Hi,

I think that I should be able to do this:

Dim $ProgramName = "Notepad.exe"

run($ProgramName, "c:\Windows\")

Am I way off? I get an error that says that seems to indicate that Notepad.exe did not replae $ProgramName.

Could not find a reference to variables in calls to functions. Probably looking in the wrong place.

Thanks for your help.

Tim

That works for me too, but maybe your windows folder is called something else, it would be safer to use

@windowsdir instead of "c:\windows\"

so try this

Dim $ProgramName = "Notepad.exe"

run($ProgramName, @windowsdir)


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

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