Skip to content

Instantly share code, notes, and snippets.

@yoko
Created June 11, 2011 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoko/1020727 to your computer and use it in GitHub Desktop.
Save yoko/1020727 to your computer and use it in GitHub Desktop.
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