oh boy if i had a penny for every time someone has fallen into this trap ;>

i've written at length about this before but i'll just summarize for now:

Code:
//inc -uY %var | if (%var >= X) {


this, similar to what was mentioned above, doesn't really trigger for a given number of reps per time interval, but rather for Y times in up to (X-1)*Y seconds (as long as each gap in time is no more than Y seconds of course). depending on the actual delays, this has the potential to be a lot more sensitive than a true X times in Y secs

Code:
//inc -z %var Y | if (%var > (X-1)*Y) {


this is a more accurate "X times in Y seconds" detector

so for 20 times in 30 seconds:

Code:
//inc -z %var 30 | if (%var > 570) {


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde