Re: Accessing/creating mailboxes in Mail.app
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