onestcoder Posted February 24, 2006 Share Posted February 24, 2006 Ok this is a little hard to explain so I hope it makes since. In the parent directory is my Main exe. Also in the directory there is an Includes folder In a sub-folder Includes is the Second exe. Also in that sub-directory Includes are more sub directories one for images images and one to hold my variable txt files vars. My Main exe is a Gui that writes variables into includes\vars\vars.txt The Main exe then runs the Second exe using includes\Second.exe Inside the Second exe all the paths read vars\vars.txt and images\pictures.jpg But the pictures and vars do not read into the exe right. So here is my question: Even though the Second exe is in the Includes folder when the Main exe runs the Second exe is its starting folder the same as the Main exe??? For example should the Second exes paths be written the same as the Main exes paths even though is in the sub-folder??? Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
ChrisL Posted February 24, 2006 Share Posted February 24, 2006 When you call the second exe did you add a working directory? Run("MySecondProg.exe", @scriptdir & "\Secondfolder") It is likely running as the main script directory unless you specify a working dir [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
onestcoder Posted February 24, 2006 Author Share Posted February 24, 2006 (edited) no i just used this in the second exe $file = FileOpen("vars\powervars.txt", 0) and GUICtrlCreatePic("img\Obotz3.jpg", 5, 5, 170, 59) it should start in the "Includes" dirctory so should it look like $file = FileOpen(@IncludesFilesDir &"vars\powervars.txt", 0) Edited February 24, 2006 by onestcoder Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
ChrisL Posted February 24, 2006 Share Posted February 24, 2006 My Main exe is a Gui that writes variables into “includes\vars\vars.txt”The Main exe then runs the Second exe using “includes\Second.exe”The part of your script where you call the second exe is what I am reffering to, if you Run the second exe with a working DIR as above then the second exe will open files relevant to its working directory.If you dont specify a working directory for the second.exe with your run command then it will likely use file paths relevant to the main.exe which is one level higher. [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
onestcoder Posted February 24, 2006 Author Share Posted February 24, 2006 understood thank you very much Need a website: http://www.iconixmarketing.com 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