I have a lot of mails inside of DT and some of them have 1 or more attachments. I don’t want to touch the original mails, but I when I invoke the script, then it will store all attachments of all selected mails as separate items in DT.
I tried to write the script for this a few weeks ago but unfortunately the TextEdit engine in OS X does not give enough access to attachment of rich text documents (that’s how the text and the attachments of email messages are presented to a script). We get access to the attachment but TextEdit does not give us the path to the actual file I am afraid.
So it seems this would require some Cocoa magic, too, and not only pure AppleScript.