To count words:
on *:input:*: {
inc %TotalWords $numtok($1-,0,32)
}
For average, you'll use $calc after setting %TotalWords.StartDate to the start date:
To set your start date to the current date/time (type once):
//set %TotalWords.StartDate $ctime
To get your averages (these are the calculations you'll insert wherever you want them):
Per day:
$calc(%TotalWords / ($ctime - %TotalWords.StartDate) * 86400)
Per week:
$calc(%TotalWords / ($ctime - %TotalWords.StartDate) * 604800)
Now, you can place those $calc commands wherever you'd like them. Here are a couple examples:
In an alias (just type /avgwords whenever you want to see the data):
alias avgwords {
echo -a $calc( ) <--- Insert the $calc command you want as well as whatever text you want it to say.
}
In a menu (right click and choose Average Words):
menu * {
Average Words:echo -a $calc( ) <--- Insert the $calc command you want as well as whatever text you want it to say.
}