Hello
This is a follow up to the hint: http://www.macworld.com/article/151436/2010/05/flaggedmessagesscript.html?lsrc=nl_mwhints_h_crawl
It displays every flagged message from every mailbox except the RSS mailboxes. That is if you use the Geektools hint above.
property finalText : {}
set newline to ASCII character 10
set finalText to "Flagged Mail:" & newline
tell application "Mail"
set theMailBoxes to every mailbox as list
repeat with aMbox in theMailBoxes
set mboxName to name of aMbox
set msgCount to count of messages in aMbox
if msgCount > 0 then
set theMessages to (every message in aMbox whose flagged status is true)
set numOfFlaggedMessages to count of theMessages
repeat with i from 1 to numOfFlaggedMessages
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 & "! " & mboxName & ":" & word 1 of fromMsg & ": " & subjMsg & newline
end repeat
end if
end repeat
end tell
Best Regards
McUsr