mIRC Homepage
Posted By: Quia $count - 24/07/06 08:39 AM
I am trying to write a script that will count the number of occurances of a long list of words, and it doesn't seem to be possible to do it the way I was thinking of..

$count($1-,%terms), with %terms being a list like so %term1,term2,term3,..termN. However, $count insists on considering this one whole term, and will only match the whole list at once, not the individual terms.

Is it possible to do something like this?
Posted By: Darwin_Koala Re: $count - 24/07/06 08:52 AM
help $numtok and other token related commands

Quote:
$numtok(text,C)

Returns number of tokens in text.


e.g. $numtok($1-,44) or $numtok(%terms, 44) (I think 44 is ",")

Cheers,

DK
Posted By: qwerty Re: $count - 24/07/06 10:07 AM
Try $count($1-, [ %terms ] )
Posted By: Quia Re: $count - 24/07/06 10:14 AM
Thanks qwerty, that did the trick.

Now I just feel stupid for forgetting that. grin
© mIRC Discussion Forums