mIRC Homepage
Posted By: MalFuncti $readini bug - 05/10/03 03:38 PM
$readini it's cutting off control-codes in the beginning of an item text. Eg.:

[Topic]
Item=<control-code>Text goes <other-control-code> here

$readini only retrieves "Text goes <other-control-code> here" without initial control codes!
Posted By: codemastr Re: $readini bug - 05/10/03 04:29 PM
I believe that's just a limitation of ini files, not much you can do about it other than use some other medium to store your information.
Posted By: topscriptz Re: $readini bug - 09/10/03 10:56 PM
You could try loading the ini file has a hash table (/hload -i) read the items then close the hash table. You can still preserve the /writeini functionality by not use hash tables to add items. Meaning close the hash table after you've read from it. you always have to reload the hash table in order to refresh it before you read the control coded lines.

maybe try a /flushini to be safe. So that all the /writeini commands will be written to the file and not buffered.

alias -l getvalue.file.ini {
/hclose getvalue.ii
hmake getvalue.ii
/hload -im getvalue.ii file.ini
hclose getvalue.ii
return $hget(getvalue.ii,$1)
}
Posted By: cold Re: $readini bug - 10/10/03 02:19 AM
/hload doesn't have a -m switch. Also, you have to specify the INI section.

But this wouldn't work anyway. It's a limitation of either INI files or mIRC reading them.. it doesn't accept those ctrl codes.
© mIRC Discussion Forums