(ITP 4-in-4 day 4+1, or how i learned to stop worrying and love blowing deadlines)
to complete the signal to noise meter previously posted i wrote up an apple script which calculates a ratio of messages in my mail inbox to the junk messages which have been caught. the apple script then sends that ratio via serial to the signal to noise meter. i’ve set up a rule in mail.app to trigger the script every time a message comes in. the serial output (ascii only, it seems) is thanks to SerialPort X.
it’s certainly not perfect…having a lot of read messages stagnating in the inbox brings the ratio down…but i’m posting the code below so maybe someone can figure a better way.
also, the script wasn’t triggering when called directly from mail’s rules…my workaround was to have a launcher script run ‘do shell script “osascript ” signalToNoise.scpt’. for some reason this worked when the launcher script was triggered by mail – YMMV.
oh! it just when off as i was writing this entry…the light came on, and the needle swung high….i need to clean out the junk mail!
code after the break (i always wanted to write “after the break”)