mIRC Home    About    Download    Register    News    Help

Print Thread
#248605 13/10/14 03:21 PM
D
drowsy
drowsy
D
Is there a way to calculate how many lines of code there is inside .ini files?

#248606 13/10/14 03:39 PM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
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

Nillen #248607 13/10/14 03:53 PM
D
drowsy
drowsy
D
Thanks

#248610 13/10/14 05:19 PM
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Also i think $lines will help too, e.g: //echo -a $lines($mircini)

westor #248612 13/10/14 07:30 PM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
Oh, that's right! I completely forgot that you could use $lines for stuff other than .txt files. ^^


Link Copied to Clipboard