mIRC Home    About    Download    Register    News    Help

Print Thread
#52597 05/10/03 03:38 PM
Joined: Dec 2002
Posts: 5
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2002
Posts: 5
$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!

#52598 05/10/03 04:29 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

#52599 09/10/03 10:56 PM
Joined: Oct 2003
Posts: 10
T
Pikka bird
Offline
Pikka bird
T
Joined: Oct 2003
Posts: 10
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)
}

Last edited by topscriptz; 09/10/03 11:00 PM.
#52600 10/10/03 02:19 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
/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.


* cold edits his posts 24/7

Link Copied to Clipboard