Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'New mail notification using the PowerMate' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
New mail notification using the PowerMate
Authored by: olivesoft on Mar 16, '04 07:00:54PM
Sorry for the formatting...

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

---
-Bob
---------------------
I tend to think of [Mac] OS X as Linux with QA and Taste.
-James Gosling, Java Architect

[ Reply to This | # ]