simple Applescript

Discussion in 'Mac Programming' started by wesg, Apr 5, 2008.

  1. macrumors regular

    wesg

    Joined:
    Jan 2, 2008
    Location:
    Toronto, ON
    #1
    I have an Applescript that does what I want it to, but it is not as efficient as I'd like. Maybe the scripting gurus of Macrumors can help me out.

    Right now my script marks every unread Mail message as read in a specific inbox. It works great for single messages, but when I get multiples, it becomes clunky.

    Code:
    set unreadMail to first message of unreadBox whose read status is false
    That is my line that sets up a variable for all the unread messages, but I can't make it use all the unread messages without using "every" instead of "first".

    Is there a way to make unreadMail set to all the unread messages without using "first" and a loop?
     

Share This Page