mIRC Homepage
Posted By: keeker /writeini problem - 06/06/06 09:40 PM
ok, i admit i dont know a heck of a lot about reading and writing ini files so i need a little help with writing to an ini file from mirc. i know the syntax is like this:
Code:
/writeini finfo.ini petra_-_it-is-finished.mp3 genre Christian_Rock

which i can do, but a lot of my filenames do not have underlines, they have spaces....is there a way to /writeini to a file with spaces?
Posted By: MikeChat Re: /writeini problem - 06/06/06 10:06 PM
the structure when you write the ini is
[topic]
item=value

when you add the sone info with no spaces
[petra_-_it-is-finished.mp3]
genre=Christian_Rock

if it has spaces (same name and stuff for the example)
[petra]
it=is finished.mp3 genre Christian_Rock

so is the ini being written from a script?
Are you manyally typing the info?
if you want the band as the topic, genre as the item and the rest as the value you could use an alias to replace the spaces in the filename with _ or - for the use in the ini

otherwise tell us how the data is gotten (script does it, you type it, whatever) and how you want to use the info and I'm sure some one on here can help you get what you want made.
Posted By: keeker Re: /writeini problem - 06/06/06 10:14 PM

Here is the code i am trying to get working:
Code:
 
alias geninfo {
  set %1 file_info.ini
  set %2 $sound($1-).artist
  set %3 genre
  set %4 $sound($1-).genre
  set %5 $1-
  writeini %1 $nopath(%5) Artist %2 %3 %4
}

and right now it is coming out like this:
Code:
[Petra]
-=It Is Finished.mp3 Artist Petra


i would like it like this:
Code:
[Petra - it is finished.mp3]
artist=petra
album=beat the system
etc=etc


is that what you were looking for?
Posted By: truguce Re: /writeini problem - 07/06/06 02:36 AM
try using this
Code:
set %5 $nopath($replace($1-,$chr(32),$chr(95)))
writeini %1 %5 Artist %2
writeini %1 %5 %3 %4

untested
© mIRC Discussion Forums