Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'View next unread message in a Mail window via the keyboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
View next unread message in a Mail window via the keyboard
Authored by: ecco on Jan 14, '10 01:01:46PM
I added "if (count of windows) > 1 then" to avoid closing the main window if no message window is open.

tell application "Mail" to try
	if (count of windows) > 1 then
		tell window 1 to close
		tell message viewer 1 to set selected messages to {first message of beginning of (get selected mailboxes) whose read status is false}
		tell message viewer 1 to open selected messages
	end if
on error
	beep
end try


[ Reply to This | # ]