Re: Mail: save attachment fails in Mountain Lion 10.8.2
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
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