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

View next unread message in a Mail window via the keyboard Apps
I've seen similar hints for this before, but none worked when a message was open in a window, rather than when using the Preview pane. I hate working with the Preview pane, so this was preventing me from using those hints.

However, by modifying others' AppleScripts, I came up with the following, which closes the current message window, then opens the next unread message:
tell application "Mail" to try
  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
on error
  beep
end try
To make this work via the keyboard, you'll need to use something like FastScripts to assign it to a hotkey.
    •    
  • Currently 2.69 / 5
  You rated: 4 / 5 (16 votes cast)
 
[7,525 views]  

View next unread message in a Mail window via the keyboard | 3 comments | Create New Account
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 | # ]
View next unread message in a Mail window via the keyboard
Authored by: dmcheng on May 11, '10 01:57:27PM

Thanks for posting this. But what if I want to view the next message even if it is already has been read, is that possible?

Thanks
David



[ Reply to This | # ]
View next unread message in a Mail window via the keyboard
Authored by: DavidB2 on Jun 10, '12 03:55:43PM

Bump.

Is it possible to have a script that would allow viewing of the next message even if it has already been read?

Thank you,

Another David



[ Reply to This | # ]