• 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
problem with perform mail action with messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with perform mail action with messages


  • Subject: problem with perform mail action with messages
  • From: airdrummer <email@hidden>
  • Date: Tue, 02 Feb 2010 00:23:58 -0500

mail.app rule fires, but i can't get it to save attachments: i get an apple event handler failed, err # -10000

is that still a problem w/ snow leopard, or mail?

using terms from application "Mail"
   on perform mail action with messages theMessages for rule theRule
     set thePath to POSIX path of (path to desktop) & "downloads/"
     tell application "Mail"
	repeat with thisMessage in theMessages
	   try
		set cmd to (subject of thisMessage)
		set replyTo to (sender of thisMessage)

		set theAttachments to (every mail attachment of thisMessage)
		repeat with theAttachment in theAttachments
		   set tvpiName to thePath & (name of theAttachment)
		   display alert replyTo & " - " & cmd & ": " & tvpiName
		   save theAttachment in thePath
		end repeat
	    on error em
		display alert em
	    end try
	end repeat
     end tell
   end perform mail action with messages
end using terms from
_______________________________________________
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: problem with perform mail action with messages
      • From: Martin Michel <email@hidden>
  • Prev by Date: Re: PDFing from InDesign CS2
  • Next by Date: Re: problem with perform mail action with messages
  • Previous by thread: Re: Excel & AppleScripting
  • Next by thread: Re: problem with perform mail action with messages
  • Index(es):
    • Date
    • Thread