• 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's document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail's document


  • Subject: Re: Mail's document
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 30 Apr 2009 07:35:29 -0500

On Apr 25, 2009, at 10:59 AM, email@hidden wrote:

A document is not a message.

Run this script:

tell application "Mail"
set myDoc to make new document at beginning
log name of myDoc
log path of myDoc
log modified of myDoc

end tell

And it creates a document, but you can't see it, you can't open it. But it's there, somewhere.

What I'm trying to do is get the 'path of myDoc', but in this case the document is not a message in 'user/Library/Mail/', but a mail document file (Kind = Mail Message, extension = emlx). Mail opens such a document with a simple double-click.

Mail's 'document' class seems to be broken. Compare Mail to TextEdit where this script ...

tell application "TextEdit"
set myDoc to document 1
log (name of myDoc) as text
log (path of myDoc) as text
log (modified of myDoc) as text
end tell

works perfectly. But, in Mail returns:
"Untitled"
""
"false"
when it should return:
"Mail's Document"
".../.../AppleScriptUsers - current/Mail's document/Mail's document 1.emlx"
"false"

(Or, perhaps the authors of Mail were being unimaginative when they disabled 'document'.)

 _______________________________________________
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

References: 
 >Mail's document (From: Luther Fuller <email@hidden>)
 >Re: Mail's document (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Mail's document
  • Next by Date: Re: Styled text and non-Gregorian dates
  • Previous by thread: Re: Mail's document
  • Next by thread: Re: Safari and "make window"
  • Index(es):
    • Date
    • Thread