I often walk away from my desk (and computer) for a bit of time. When I get back, I have to interrupt the screensaver to see if I received any mail while I was away. I always wished the screensaver could just let me kow and save me the trouble of having to unlock my computer to find out. It turns out this is very simple in OS X. Here is what I did with a few minutes worth of learning AppleScript. (I am sure more experienced folks can find more elegant solutions.)
Here's the four-step solution:
[robg adds: I haven't tested this one, but it seems simple enough.]
Here's the four-step solution:
- Create two image files, one called youhavemail.jpg and one called youhavenomail.jpg. My images are light blue text over a black background. The text says "You have mail" for the first file, and "No new mail" for the second file.
- Create a new folder, I called mine screensaverpix. I created the files and the folder in my top-level directory. If you put them somewhere else, modify the script below accordingly.
- Run the following AppleScript. You can compile it and run as an app at login if you would like:
repeat tell application "Mail" to set TotalNumberofnewmessages to unread count of inbox if (TotalNumberofnewmessages is greater than 0) then do shell script "cp ~/youhavemail.jpg ~/screensaverpix/pix1.jpg" do shell script "cp ~/youhavemail.jpg ~/screensaverpix/pix2.jpg" else do shell script "cp ~/youhavenomail.jpg ~/screensaverpix/pix1.jpg" do shell script "cp ~/youhavenomail.jpg ~/screensaverpix/pix2.jpg" end if delay 70 end repeat - Set the Screen Saver tab of the Desktop & Screen Saver System Preferences panel to use the images in the folder you created in step two.
[robg adds: I haven't tested this one, but it seems simple enough.]
•
[10,845 views]

