Tioner Posted July 27, 2013 Share Posted July 27, 2013 hey everyone, thanks for stopping by:) sooo I have an issue, I'm writing an auto-starter for myself, when I start the script, I want it to run a few programs on its own. I'm pretty much done, except for one part. each of the programs has a .config file in their folder, the problem is, when I place the script in a folder and if the programs are in a pile of subfolders, there's an error. autoit runs it and returns a PID, but the app stops with an error that it couldnt locate the .config file. when I put the script in the same folder, it runs with no problems. I tried shellexecute, I tried @workingdir &"location", the result was the same. any ideas? Link to comment Share on other sites More sharing options...
Developers Jos Posted July 27, 2013 Developers Share Posted July 27, 2013 Have you defined the proper workdir on the Run() command? Show an example of what you have tried that isn't working with one of your programs. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Tioner Posted July 27, 2013 Author Share Posted July 27, 2013 (edited) thanks for replying Jos! well this is just a piece of a function I'm writing, I tried with one program and it didnt really work so I havent finished it: func startup() Run("Store\Store.exe") EndFunc func startup() Run(@workingdir &"\Store\Store.exe") EndFunc func startup() Run(@scriptdir &"\Store\Store.exe") EndFunc all of them started the program, but then the program returned an error that it couldnt find the .config file in the directory of the script , not the directory it was in. Edited July 27, 2013 by Tioner Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted July 27, 2013 Developers Solution Share Posted July 27, 2013 The workdir parameter is the second parameter so should look something like this Run("Store\Store.exe","Store") Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Tioner Posted July 27, 2013 Author Share Posted July 27, 2013 thank you for your help Jos. I could not find out what it is, as the helpfile contains no info regarding the workingdir param. thanks for helping me, now it works as it should 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