May 13, '10 07:30:01AM • Contributed by: dushu
I flag mail which I need to respond to, however, many times I forget to check my Flagged Mail mailbox. To keep these flagged mails visible, I finally sat down and -- with lots of help from the internet -- created the following AppleScript. With the help of Geektool, I now have the sender and subject of flagged mails visible on my desktop.
Here's the script:
set newline to ASCII character 10 set finalText to "Flagged Mail:" & newline tell application "Mail" set theMessages to every message in inbox whose flagged status is true repeat with i from 1 to number of items in theMessages set thisMessage to item i of theMessages set fromMsg to (sender of thisMessage as string) set subjMsg to (subject of thisMessage as string) set finalText to finalText & "! " & word 1 of fromMsg & ": " & subjMsg & newline end repeat end tell finalText
osascript ~/Documents/Workflows/flagged\ mail.scptHope this helps someone in the same situation as me.
[robg adds: This worked as described for me.]
