Frontmost Message Viewer
Frontmost Message Viewer
- Subject: Frontmost Message Viewer
- From: Luther Fuller <email@hidden>
- Date: Sat, 29 Dec 2007 20:22:14 -0600
If there are more than one message viewers open in Mail, which one is
frontmost?
Mail's dictionary says that a window (of a message viewer) has the
property ...
index integer : The index of the window in the back-to-front window
ordering.
So, the frontmost message viewer should be the one with the largest
index. If I wanted to select a mailbox in the frontmost message
viewer, I should be able to run ...
tell application "Mail"
set viewerIndex to (count message viewers)
set selected mailboxes of (message viewer index viewerIndex) to
{mailbox "_Action ! ! ! ! ! !"}
end tell
But, this does not work!
The indexing of message viewers is assigned as new message view
windows are opened. The first viewer created has index = 1, the next
has index = 2, ... &c. and these indexes do not change. The oldest
viewer window has index 1, ALWAYS. The youngest window has the index
= (count message viewers), ALWAYS. The indexes only change when
viewer windows are opened or closed. The "back-to-front window
ordering" is ignored.
What I need to do is get the selected mailboxes or messages of the
FRONTMOST message viewer window. There does not seem to be any way do
do this. I smell a bug here. But, maybe, someone knows something I've
missed. I hope!
_______________________________________________
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