ironmanexe Posted November 14, 2006 Share Posted November 14, 2006 $Aujard = FileOpenDialog ( "Find Aujard : Aujard.exe", @ScriptDir, "Executeables (*.exe)", 1 + 2, "Aujard.exe.exe") IniWrite("Files.ini","Files","Aujard",$Aujard) Writes all but the value Cant get much more specific than that. What am i missing here? Time + Effort = Constant Link to comment Share on other sites More sharing options...
boogieoompa Posted November 14, 2006 Share Posted November 14, 2006 $Aujard = FileOpenDialog ( "Find Aujard : Aujard.exe", @ScriptDir, "Executeables (*.exe)", 1 + 2, "Aujard.exe.exe") IniWrite("Files.ini","Files","Aujard",$Aujard) Writes all but the value Cant get much more specific than that. What am i missing here? I'm not entirly sure what you are asking but on a cursory look you have 2 typos that might effect your reference, Executeables and .exe.exe What specifically are you trying to do. I think you are using the wrong function (FileOpenDialog) but I am unclear what you ultimate goal is. Link to comment Share on other sites More sharing options...
ironmanexe Posted November 14, 2006 Author Share Posted November 14, 2006 (edited) The .exe.exe is me changing from actual filenames, Executeables Has no real effect. I want to write the return of FileOpenDialog To a value in an ini file, The script constructs the file but dosent write the values to the keys The overall goal is that the user opens the file and the script saves its location for the next run... A standard ini file looks like: [sectionName]Key=Value If file does not exist, it is created. Keys and/or sections are added to the end and are not sorted in any way. Edit: Detail Edited November 14, 2006 by ironmanexe Time + Effort = Constant Link to comment Share on other sites More sharing options...
fu2m8 Posted November 14, 2006 Share Posted November 14, 2006 $Aujard = FileOpenDialog ( "Find Aujard : Aujard.exe", @ScriptDir, "Executeables (*.exe)", 1 + 2, "Aujard.exe.exe") IniWrite("Files.ini","Files","Aujard",$Aujard) Writes all but the value Cant get much more specific than that. What am i missing here? hmm the code you posted is working for me: output of Files.ini file in the directory i ran the script from (H:\SOE3\SCRIPTS\makedir.exe is the .exe i selected): [Files] Aujard=H:\SOE3\SCRIPTS\makedir.exe is this the type of output you are expecting?! Link to comment Share on other sites More sharing options...
ironmanexe Posted November 14, 2006 Author Share Posted November 14, 2006 (edited) Yes, Mabey it has do do with me using multiple drives IE: Having the script on my flash drive (Not a permanent home of course) However, The script executes the file later on just fine Edit: No luck...... Edited November 14, 2006 by ironmanexe Time + Effort = Constant Link to comment Share on other sites More sharing options...
ironmanexe Posted November 14, 2006 Author Share Posted November 14, 2006 It only output's the names of files in the script dir...... Wth :/ Time + Effort = Constant Link to comment Share on other sites More sharing options...
Valik Posted November 14, 2006 Share Posted November 14, 2006 FileOpenDialog() changes the working directory. You don't specify an explicit path in IniWrite() so it uses the working directory. Since FileOpenDialog() changed the working directory, the INI file is not where you think it should be. Always specify an explicit path to something. 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