|
|
New mail notification using the PowerMate
To make it so you don't need a crontask, make the AppleScript and Stay Open Application by choosing "Application" from the File Format popup in the Save As dialog and the "Stay Open" option. The "return 60" at the end of the idle handler will cause it to be executed every 60 seconds. This way, you can just add it to your Login Items (or Startup Items in Panther) instead of having to rerun it every minute.
on idle
try
tell application "System Events" to if (exists process "Mail") is false then
set theCount to 0
else
tell application "Mail" to set theCount to unread count of in mailbox
end if
if theCount > 0 then
tell application "PowerMateDriver" to set pulse always to true
else
tell application "PowerMateDriver"
set pulse always to false
set brightness to 0
end tell
end if
end try
return 60
end idle
---
New mail notification using the PowerMate
Sorry for the formatting...
--- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|