• 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: Axel Luttgens <email@hidden>
  • Date: Sun, 2 Jan 2011 11:51:42 +0100

Le 2 janv. 2011 à 04:51, Christopher Stone a écrit :

> [...]
>
> If anyone is aware of a better way I'd love to know.

Hello Christopher,

Better, I don't know... ;-)
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.
For example:

on MinInlist(L)
	local M
	if (count of L) is 1 then return item 1 of L
	set M to mininlist(rest of L)
	if item 1 of L ≥ M then return M
	return item 1 of L
end MinInlist

tell application "Mail"
	try
		set frontMessageViewer to item 1 of (message viewers whose index of its window is my MinInlist(index of windows of message viewers))
	on error
		set frontMessageViewer to missing value
	end try
end tell

I guess a recursive handler shouldn't be a cause of concern here.

Happy new year to all,
Axel

 _______________________________________________
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: Accessing/creating mailboxes in Mail.app
      • From: Christopher Stone <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>)

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