Sparrowlord Posted April 17, 2009 Share Posted April 17, 2009 (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 April 17, 2009 by Sparrowlord Link to comment Share on other sites More sharing options...
MrMitchell Posted April 17, 2009 Share Posted April 17, 2009 (edited) Can you show us the code for script1 and script2? Or at least the part that loads the config file? Edited April 17, 2009 by MrMitchell Link to comment Share on other sites More sharing options...
Sparrowlord Posted April 17, 2009 Author Share Posted April 17, 2009 (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 April 17, 2009 by Sparrowlord Link to comment Share on other sites More sharing options...
Developers Jos Posted April 17, 2009 Developers Share Posted April 17, 2009 (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 April 17, 2009 by 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...
Sparrowlord Posted April 17, 2009 Author Share Posted April 17, 2009 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. Link to comment Share on other sites More sharing options...
Juvigy Posted April 17, 2009 Share Posted April 17, 2009 Post here the part that you use to load the settings from the INI file 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