• 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: Accessing/creating mailboxes in Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing/creating mailboxes in Mail.app


  • Subject: Re: Accessing/creating mailboxes in Mail.app
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 2 Jan 2011 06:17:00 -0600

On Jan 02, 2011, at 04:51, Axel Luttgens wrote:
I just see a slight potential problem: Mail's frontmost window isn't necessarily a message viewer so that, strictly speaking, one has to take the index value into account.
______________________________________________________________________

Hey Axel,

Nice.

I hadn't intended that routine to work if the front window wasn't a message viewer, but I hadn't considered getting just the indices of the message viewer windows.  So your script gives me a thing or two to think about.  Thanks.

Now.  Do you have a slick way of determining if the front message is an outgoing message and getting a reference to it?

In Eudora you could easily discover what kind of window was frontmost, and you could refer to the front message as 'message 0', and you could tell if it was outgoing.  It was pretty convenient.

Here's my kludgy work-around for Mail:

tell application "Mail"
set frontWindowName to item 1 of (get name of windows whose name is not "")
set foundMessages to messages of drafts mailbox whose subject is frontWindowName
# If more than one this should be the most recent:
set frontOutgoingMessage to item 1 of foundMessages


properties of frontOutgoingMessage
end tell

** Note: this fails if you do not save the front outgoing message before running the script (or do not wait many seconds for Mail to register the fact that it has a new outgoing message).

--
Chris
 _______________________________________________
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: 
 >Re: Accessing/creating mailboxes in Mail.app (From: Luther Fuller <email@hidden>)
 >Re: Accessing/creating mailboxes in Mail.app (From: Christopher Stone <email@hidden>)
 >Re: Accessing/creating mailboxes in Mail.app (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: grep 2.7 & linked-images
  • Next by Date: Re: grep 2.7 & linked-images
  • Previous by thread: Re: Accessing/creating mailboxes in Mail.app
  • Next by thread: Re: Accessing/creating mailboxes in Mail.app
  • Index(es):
    • Date
    • Thread