Created
June 11, 2011 16:27
-
-
Save yoko/1020727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using terms from application "Mail" | |
on perform mail action with messages theMessages for rule theRule | |
tell application "Mail" | |
repeat with eachMessage in theMessages | |
set theSubject to (subject of eachMessage) | |
set theContent to (content of eachMessage) | |
set {year:y, month:m, day:d, time string:t} to (date sent of eachMessage) | |
set theDate to ((y * 10000 + m * 100 + d) as string) & " " & (t as string) | |
tell application "GrowlHelperApp" | |
register as application ¬ | |
"Mail.app Rules" all notifications {"Turntable Notifier"} ¬ | |
default notifications {"Turntable Notifier"} ¬ | |
icon of application "Mail" | |
notify with name "Turntable Notifier" title "Turntable" description theSubject application name "Mail.app Rules" | |
end tell | |
end repeat | |
end tell | |
end perform mail action with messages | |
end using terms from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment