• 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: Mail: save attachment fails in Mountain Lion 10.8.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail: save attachment fails in Mountain Lion 10.8.2


  • Subject: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • From: "koenig.yvan" <email@hidden>
  • Date: Wed, 26 Sep 2012 10:15:03 +0200


Le 26/09/2012 à 04:44, Lists <email@hidden> a écrit :

On Sep 25, 2012, at 5:26 PM, Neil Faiman <email@hidden> wrote:

What I seem to have discovered is that "save _attachment_ in _path_" no longer works, but that if you change it to "save _attachment_ in FILE _path_", it works just fine.

Regards,

Neil Faiman

In the script I was using, this line which worked last week (or month),

"set filePath to ((path to documents folder) as string) & "Mail Attachments:" & fileName"

was inside a tell app "Mail" block (as well as inside a repeat loop making unnecessary OSAX calls). That was incorrectly returning:

path to documents folder
--> alias "Sox:Users:j:Library:Containers:com.apple.mail:Data:Documents:"

Getting "path to documents folder" out of the Mail tell block fixed it


Hello

Documented feature.
path to is a Standard Additions feature.
If we call it in a tell application block, it issue an error.
With
tell application "Mail"
activate
path to documents folder
end tell

the log report is :

tell application "Mail"
activate
path to documents folder
--> error number -1708
«event ascrgdut»
--> error number -1708
path to documents folder
--> alias "Macintosh HD:Users:<userAccount>:Library:Containers:com.apple.mail:Data:Documents:"
end tell


You found a way to get rid of that.
An other one is to leave it where it was but encapsulate it in a tell current application block.
With
tell application "Mail"
activate
tell current application
path to documents folder
end tell
end tell

the log report is :
 
tell application "Mail"
activate
end tell
tell current application
path to documents folder
--> alias "Macintosh HD:Users:<userAccount>:Documents:"
end tell

Yvan KOENIG (VALLAURIS, France) mercredi 26 septembre 2012 10:14:58



 _______________________________________________
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: Mail: save attachment fails in Mountain Lion 10.8.2
      • From: Brian Christmas <email@hidden>
References: 
 >Mail: save attachment fails in Mountain Lion 10.8.2 (From: Neil Faiman <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Lists <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Neil Faiman <email@hidden>)
 >Re: Mail: save attachment fails in Mountain Lion 10.8.2 (From: Lists <email@hidden>)

  • Prev by Date: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Next by Date: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Previous by thread: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Next by thread: Re: Mail: save attachment fails in Mountain Lion 10.8.2
  • Index(es):
    • Date
    • Thread