Jump to content

Variables within executable parameters


Recommended Posts

Hi

i am trying to set up a script to run a program (aida32) using the program's command line parameters. the problem i have is the parameters include a path to a file which includes a variable, as below:

run(@ScriptDir&'\aida32.exe /r' @Scriptdir&'\PCName /custom '@ScriptDir&'\asset.rpf /csv /silent')

i have also tried:

ShellExecuteWait (@ScriptDir&'\aida32.exe /r',@ScriptDir&'\reports\PCName /custom '@ScriptDir&'\asset.rpf /csv /silent')

but i just keep getting an error:

run(@ScriptDir&'\aida32.exe /r c:\reports\PCName /custom '@ScriptDir&'\asset.rpf /csv /silent')

run(^ ERROR

if i run the script with 1 parameter, ie:

ShellExecuteWait (@ScriptDir&'\aida32.exe /r')

or with a fixed path replacing the second variable, ie:

ShellExecuteWait (@ScriptDir&'\aida32.exe /r','c:\reports\PCName')

it runs, no problem, but i can't use a fixed path as it will vary.......hence the variable :rolleyes:

can anyone help.......PLEEEEAAASSSEEE :rambo:

thanks

Rich

Edited by sxyrich
Link to comment
Share on other sites

just a syntax error :rolleyes:

c2--><!--UnVuKEBTY3JpcHREaXIgJmFtcDsgJiMzOTsmIzA5MjthaWRhMzIuZXhlIC9yJiMzOTsgJmFtcDsgQFNjcmlwdERpciAmYW1wOyAm
IzM5OyYjMDkyO1BDTmFtZSAvY3VzdG9tICYjMzk7ICZhbXA7IEBTY3JpcHREaXIgJmFtcDsgJiMzOTsmIzA5Mjthc3NldC5ycGYg
L2NzdiAvc2lsZW50JiMzOTsp--><!--eg

you have to use & to concat strings

Thank you very much Piccaso, that's done the trick. i've not used AutoIT since version 2, so am a little rusty....been using Autohotkey, but am now back in the fold :rambo:

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...