mIRC Home    About    Download    Register    News    Help

Print Thread
#150676 06/06/06 09:40 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
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?


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
#150677 06/06/06 10:06 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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.

#150678 06/06/06 10:14 PM
Joined: Dec 2002
Posts: 204
K
keeker Offline OP
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204

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?


keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
#150679 07/06/06 02:36 AM
Joined: Oct 2005
Posts: 91
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
try using this
Code:
set %5 $nopath($replace($1-,$chr(32),$chr(95)))
writeini %1 %5 Artist %2
writeini %1 %5 %3 %4

untested


Link Copied to Clipboard