Sign in to follow this  
Followers 0
Tioner

Run() issue.

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Tioner

Share this post


Link to post
Share on other sites

The workdir parameter is the second parameter so should look something like this

Run("Store\Store.exe","Store")

Jos





			
		

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 :)

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