mIRC Homepage
Posted By: drowsy Noob Question. - 13/10/14 03:21 PM
Is there a way to calculate how many lines of code there is inside .ini files?
Posted By: Nillen Re: Noob Question. - 13/10/14 03:39 PM
Use $ini.
Example:
Code:
alias inicount {
var %file $iif(.ini isin $1,$1,$1 $+ .ini)
var %i 1 
var %p $ini(%file,0)
var %n %p
while (%i <= %p) {
inc %n $ini(%file,%i,0)
inc %i
}
echo -ag The total number of lines in %file are: %n 
}
Untested, but should work. (I don't have access to a mIRC application right now)
Use /inicount file
Posted By: drowsy Re: Noob Question. - 13/10/14 03:53 PM
Thanks
Posted By: westor Re: Noob Question. - 13/10/14 05:19 PM
Also i think $lines will help too, e.g: //echo -a $lines($mircini)
Posted By: Nillen Re: Noob Question. - 13/10/14 07:30 PM
Oh, that's right! I completely forgot that you could use $lines for stuff other than .txt files. ^^
© mIRC Discussion Forums