Hello
I decided that the down-arrow in Mail, to go to the next message, was too finicky on a MacBook, and so went to find an Applescript to do it, so that I could bind the F-key to it. I did find one which went part of the way (sorry, I can’t find the original post). I have now modified that to deal with
- no selection
- selection at end
- multiple selection.
However it falls over with threads. I find I am out of my depth here.
-- Move the highlight to the next message in the active window.
-- PROBLEM: Does not work with threads.
tell application "Mail"
if selection is not {} then
set s to last item of (get selection)
set selMailbox to mailbox of s
if id of message after s exists then
set nextMessage to id of message after s
set selected messages of first message viewer to {first message of selMailbox whose id is nextMessage}
end if
end if
end tell
I have since found the submission by McUsr in the Code Exchange forum, however that one doesn’t handle threads either. Please, I am looking for a solution, plus improvements to the above code.
Thanks
Greg