OK, I am playing around with some INI stuff. Somehow it does not work. Am I 
doing something wrong, or does it not work due to the feature not being 
supported?

I have the need for saving some keys and values on the fly. Fact is, that even 
the keys might be created on the fly, due to some actions performed in the app. 
A basic example, would be like this:

 InputFile.ReadLine Incoming
 Value = 93
 RegIni( Incoming )
Sub RegIni( NewKey )
 Set MIF = IniFile( ClientInformation.ScriptPath &"\MyApp.ini" )
 MIF.Text( "MyKeys", NewKey ) = Value
Set MIF = Nothing
End Sub 'RegIni.

OK, so in this example, we read a string from a source, like a file. This 
string, would be the name of our new key. We then set the Value to a number, it 
could be either a hard-coded value, or something created by the app on the fly.

Next, The sub RegIni is being called. Reason for putting it into a sub, is that 
then we can call it at any time in the code processing, without repeating the 
lines in our code. Besides, makes the stuff a bit more tidy.

My Idea was to have the sub create the new key, with the incoming name, under 
the section named 
MyKeys. This section already exists in the INI file. Well, the thing is, that 
running the above code, does NOT add a new key to the INI. It actually does do 
nothing to the INI file at all. Have a feeling I am missing something here. But 
what?

Any feedback is more than welcome here.

Reply via email to