MACSCRPT Archives

February 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Delacour <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 8 Feb 2007 12:06:59 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
At 5:46 pm +0100 6/2/07, J.L. Slangen wrote:

>... I have not discovered in the Mail.app Dictionary any command 
>that moves an attachment from inside Mail to outside Mail. That is 
>to say, I am unable to get the "move", "make" and "save" commands to 
>do anything that comes near to what the aforementioned Save button 
>accomplishes. Any suggestion?

You can get the source of the message

         tell application "Mail"
          set _message to  item 1 in (get selection)
          set _source to source of _message
         end tell

then parse it to extract the base64-encoded data of the attachment, 
decode this using Perl, munpack or something, and write to a file. 
It's not too difficult once you've done it.

JD

ATOM RSS1 RSS2