INI file handling question..

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

INI file handling question..

Post by kagonis » Tue Nov 04, 2003 3:52 pm

Is it in any way possible to remove a key from an ini file, with MQ alone?

I know so far that you add a new key with:

Code: Select all

/ini "file" "section" "key" "value"
You read a value with:

Code: Select all

$ini("ini","section","key")
I tried to see if you could remove a key by simply giving it an empty value like this:

Code: Select all

/ini "file" "section" "key"
But this just overwrites the old key with an empty value.

And another thing that I would consider a bug/error is:

Code: Select all

/ini "file" "section"
will write to the section, with no key and no value, in effect just writing an equal sign. This should return an error instead IMO.

Help