Sign in to follow this  
Followers 0
ironmanexe

ini Write?

7 posts in this topic

$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 :whistle: Cant get much more specific than that. What am i missing here?


Time + Effort = Constant

Share this post


Link to post
Share on other sites



$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 :whistle: 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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 :whistle:

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

Time + Effort = Constant

Share this post


Link to post
Share on other sites

$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 :whistle: 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?!

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 :whistle:

Edit: No luck......

Edited by ironmanexe

Time + Effort = Constant

Share this post


Link to post
Share on other sites

It only output's the names of files in the script dir...... Wth :/


Time + Effort = Constant

Share this post


Link to post
Share on other sites

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.

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