mIRC Home    About    Download    Register    News    Help

Print Thread
ini file with /write #23864 12/05/03 09:14 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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

Re: ini file with /write #23865 12/05/03 09:15 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i think it means.
you can use read to find whatsinside an ini file and user /write to modify it


new username: tidy_trax
Re: ini file with /write #23866 12/05/03 09:18 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
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?


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: ini file with /write #23867 12/05/03 09:19 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: ini file with /write #23868 12/05/03 09:25 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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 ?

Re: ini file with /write #23869 13/05/03 12:51 PM
Joined: Apr 2003
Posts: 414
Adrenalin Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
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 ..


mIRC Chm Help 6.16.0.3 Full Anchored!
Re: ini file with /write #23870 13/05/03 01:50 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.