mIRC Homepage
Posted By: ScatMan ini file with /write - 12/05/03 09:14 PM
i want to know if u can write an ini file with /write, i know that it will write the data but i want to know if it will still be a REAL ini file (i don't know how to say it in other words)
i read the helpfile, it says:
"Note: u cannot use this command to write an ini file. if u do so, u will most likely corrupt the ini file"
but i don't really understand what he meant
Posted By: pheonix Re: ini file with /write - 12/05/03 09:15 PM
i think it means.
you can use read to find whatsinside an ini file and user /write to modify it
Posted By: theRat Re: ini file with /write - 12/05/03 09:18 PM
alias initest {
write file.ini [test]
write file.ini test=working
echo -a this is $readini(file.ini,test,test)
}

seems to work, if you know what you're doing
but why would any1 use /write to write .ini's?
Posted By: starbucks_mafia Re: ini file with /write - 12/05/03 09:19 PM
An ini file is still just text, so yes, /write can technically be used to write to an ini file. But unless you manually write to it in the correct ini format you will most likely make the file unuseable. There's really no need to use /write for this since /writeini exists.
Posted By: ScatMan Re: ini file with /write - 12/05/03 09:25 PM
ok, thx guys
i don't need to use it i just wanted to know if it's possible
so .ini file is the same as .txt ?
if it is so is it possible to /writeini to a txt file ?
Posted By: Adrenalin Re: ini file with /write - 13/05/03 12:51 PM
Sure .. The mirc don't care what extension you have(.txt,.lol,.other) .. But it must be a plain text .. And the data from the file must be in corect format ..
Posted By: starbucks_mafia Re: ini file with /write - 13/05/03 01:50 PM
An ini file is a structured format of plain text file. If you open an ini file in a text editor it will be human readable, however it won't just be laid out as written text, it will have topics and item names that allow programs to easily find the peice of information they are looking for.

/writeini could probably write to a text file, but it would write to it in an ini file structure, eg.
[topic]
item=value

Obviously you wouldn't want that in a regular text file since it would have no meaning.
© mIRC Discussion Forums