Okay, I own a PowerMate gadget that I have not used in a very very long time. So this afternoon I deiced to play with it and make a couple of scripts that help me at work.
My first task was to make the thing pulse when I have unread email in my inbox. After some simple searching I found a nice entry at macosxhints.com about the script. I also found some smart posts that contained some very efficient apple scripts. One them had a nice idea of using the “say” command to make the mac speak some text! I found this to be very entertaining and started to think how I could use this when I wanted to. Just a little side note: I have decided to stop checking my email ever 10 seconds and move that to 10 minutes. I find that checking email or seeing that I have unread email ever 10 seconds or so is very disruptive in the moment of my thoughts and projects. So I have decided to increment my email checking to 10 minutes for now. I might even increase this to 20 minutes. Not sure yet. Back to the script. I liked the idea of a script telling me when it was checking my email but I wanted to have the ability to toggle this on and off with a preferences setting. After a little searching, I found a great idea and put it to good use. It was so good that I had to write it down because I know I will be trying to implement this in future scripts.
Explanation of the preferences
To use the preferences here are the following examples of commands to type in your terminal: