mIRC Home    About    Download    Register    News    Help

Print Thread
$readini eats first color code #176119 03/05/07 07:37 PM
Joined: May 2007
Posts: 1
P
PoRNoMoRoZ Offline OP
Mostly harmless
OP Offline
Mostly harmless
P
Joined: May 2007
Posts: 1
mircroot\temp\test contents:
Code:
[test]
test=10test3test8test

//echo -a $readini(temp\test,test,test)
returns 10test3test8test

Re: $readini eats first color code [Re: PoRNoMoRoZ] #176125 03/05/07 11:07 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try putting a space between the = and the Ctrl+K character.

Re: $readini eats first color code [Re: PoRNoMoRoZ] #176128 04/05/07 01:02 AM
Joined: Jan 2004
Posts: 1,378
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,378
I won't consider this a bug until you show us how you were able to use /writeini to send the eaten color codes to the .ini in the first place.

Re: $readini eats first color code [Re: maroon] #176131 04/05/07 01:24 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
At no point does the OP state that the information was written with /writeini. As ini files can be edited using a text editor, it's possible that the entry was made in that manner, rather than using /writeini.

Re: $readini eats first color code [Re: PoRNoMoRoZ] #176144 04/05/07 09:39 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Microsoft Windows does not support control codes in INI files. this is not a mIRC problem but a 'feature' in Windows. nothing you can do about it except using $chr() or $encode/$decode.
I used to use $decode uptill the moment it was locked by default :-[ it worked perfectly but unfortunately I can't use it anymore since users have to unlock $decode for it to work...

it goofed up for me all the time while trying to use control codes in ini files, usually by not returning the entire lines.


If it ain't broken, don't fix it!
Re: $readini eats first color code [Re: Doqnach] #176148 04/05/07 12:20 PM
Joined: Jul 2003
Posts: 655
Om3n Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
There is no official ini file specification, therefor control codes are neither supported not unsupported in the file format itself. The ini file format is a very old configuration storage method that was surpased a long time ago, though never fully abandoned (obviously).

While it may not (im not certain) be natively supported by many API's or by microsofts API's, it is certainly not something that can not be done or that is a limitation of the format. Rather, it is a limitation of the API (or custom routine) used by the application/programming language.

There is an unofficial specification here: http://www.cloanto.com/specs/ini.html

So basically this is a limitation (or intentional behavior?) of mIRCs routines and not of the file format itself.

There are definately other programs that utilize an ini file storage method and handle control codes just fine. (a common example of this is flashfxp)


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Re: $readini eats first color code [Re: PoRNoMoRoZ] #176149 04/05/07 02:00 PM
Joined: Dec 2002
Posts: 580
N
NaquadaServ Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
I had closely related problem a few years back, which is when I stopped using ini files to save things, and switched to using hash tables. More difficult to use, but if you write a nice interface, they work great. smile


NaquadaBomb
www.mirc-dll.com