I am trying to automate the creation of a smart mailbox in Apple Mail using criteria based on the currently selected message (e.g. create a folder to display all messages from the person who sent the current message). Clearly, I can go in and create a smart mailbox by hand, but because I do this regularly I am hoping to automate it.
I could not find any reference to Smart Mailboxes in the Dictionary for Mail. I did an internet search and could not find any sample code for manipulating Smart Mailboxes in Applescript, only a reference in a discussion from 2006 that says (bottom of the thread) that it can't be done: http://forums.macosxhints.com/archive/index.php/t-51935.html
I also found a script to bring up the create smart mailbox dialog, but that's not what I'm looking for.
Anyone know if there's a way to create/edit a smart mailbox in AppleScript?
Thanks.