Sign in to follow this  
Followers 0
Sparrowlord

"Run" Help

6 posts in this topic

#1 ·  Posted (edited)

I've made a script (Script1) that is controlling another script (Script2). Each script has their own configuration file located in the script directory. With "Script1" I'm trying to run the exe for "Script2", but it's trying to use the config for "Script1".

Is there a way to actually run Script2 so it uses it's own config instead of trying to use the config for the first script?

Edited by Sparrowlord

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Can you show us the code for script1 and script2? Or at least the part that loads the config file?

Edited by MrMitchell

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Let me explain a bit more..

/Script1
    Script1.exe
    Config.ini
/Script2
    Script2.exe
    Config.ini

As you can see above each script has it's own folder on my desktop. When I try running Script2.exe from my Script1.exe.. for some reason it tries to read the Config.ini for Script1.

I'm trying to run Script2.exe so it uses it's configuration file.

Does that help explain it better?

Edited by Sparrowlord

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Does that help explain it better?

Not really because you failed to show a scriptlet that demonstrates your issue.

Anyways a wild guess: Could it be that the working directory is still point to the script1 directory and you are not using the full path when trying to read the script2\config.ini?

Edited by 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

Not really because you failed to show a scriptlet that demonstrates your issue.

Anyways a wild guess: Could it be that the working directory is still point to the script1 directory and you are not using the full path when trying to read the script2\config.ini?

*Whistles* I suppose that could be the problem.. went back into Script2 and changed everything to use the full path when trying to read the config.ini and it worked like a charm.

Share this post


Link to post
Share on other sites

Post here the part that you use to load the settings from the INI file

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