sxyrich Posted June 19, 2007 Share Posted June 19, 2007 (edited) 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 can anyone help.......PLEEEEAAASSSEEE thanks Rich Edited June 19, 2007 by sxyrich Link to comment Share on other sites More sharing options...
DW1 Posted June 19, 2007 Share Posted June 19, 2007 (edited) What is the variable? the PCname is the var? Because you CAN use $variables in the Run() command Edited June 19, 2007 by danwilli AutoIt3 Online Help Link to comment Share on other sites More sharing options...
piccaso Posted June 19, 2007 Share Posted June 19, 2007 (edited) just a syntax error Run(@ScriptDir & '\aida32.exe /r' & @ScriptDir & '\PCName /custom ' & @ScriptDir & '\asset.rpf /csv /silent') you have to use & to concat strings Edited June 19, 2007 by piccaso CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
sxyrich Posted June 20, 2007 Author Share Posted June 20, 2007 just a syntax error 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now