• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Saving Attachements to a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving Attachements to a folder


  • Subject: Re: Saving Attachements to a folder
  • From: Michelle Steiner <email@hidden>
  • Date: Mon, 20 Aug 2007 10:02:49 -0700

On Aug 20, 2007, at 4:17 AM, Ronald Hofmann wrote:

Could somebody point me to the right direction?

First, the selection is a list; you have to extract the first item. set x to item 1 of (get the selection)

secondly, the term is "mail attachment", not "attachment", and be careful of the spelling of "attachment".

Third, there may be more than one attachment; attachments are elements, not properties, of messages. Again, you're dealing with a list.

This will get the name of the file:

tell application "Mail"
	set x to item 1 of (get the selection)
	set y to name of mail attachment 1 of x
end tell

The file itself is probably in a hidden directory; all you need to do is figure out which directory that is, and you can then move or copy the file to where you want it.

Alternatively, you might be able to use GUI scripting to click on the Save button and then navigate the Save dialog.

-- Michelle

--
"Better Plan B than plan d & c."


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Saving Attachements to a folder
      • From: Luther Fuller <email@hidden>
References: 
 >Saving Attachements to a folder (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: iWork/Pages problems
  • Next by Date: Re: iWork/Pages problems
  • Previous by thread: Re: Saving Attachements to a folder
  • Next by thread: Re: Saving Attachements to a folder
  • Index(es):
    • Date
    • Thread