Jump to content

ini Write?


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
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?!

Link to comment
Share on other sites

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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...