AppleScript stopped working in Sierra

Discussion in 'Mac Programming' started by dgold1055, Sep 9, 2016.

  1. dgold1055 macrumors newbie

    Jul 16, 2015
    I have a simple AppleScript to mark sent mail as read in Apple Mail. I have been using it for sometime but it has stopped working and I'm wondering anything has changed with Sierra that has caused it to malfunction. The script is:
    tell application "Mail"
    set the read status of messages of mailbox "Sent" of account "iCloud" to true
    end tell

    Any ideas would be helpful.
  2. mpainesyd macrumors 6502


    Nov 29, 2008
    Sydney, Australia
    If it is saved as an app try recompiling it. That has worked for me in previous OSX upgrades.
    Otherwise it is possible that the commands such as "read status..." no longer work :(
  3. posguy99 macrumors 6502a

    Nov 3, 2004
    Saying "stopped working" is not helpful. What error message is returned?
  4. lennyeiger macrumors member

    Jan 6, 2015
    Santa Cruz, CA
    First off, anyone that does AppleScript without Script Debugger from Late Night Software is crazy. There are debugging tools galore, an incredible interface and a excellent access to dictionaries (among many other features). I've been a user since v1, they just release v6. Worth every penny. (No, I don't own stock or have any financial interest int he company.)

    I just check and the dictionary for El Cap does state the correct property is "read status" as you suggest. I can't help you with Sierra as I haven't installed it, but the dictionary is where to look, if you haven't already. If it is a bug, the folks on the forum for Script Debugger are the place I would go (or maybe stack overflow).

    Good luck.
  5. Zazoh macrumors 6502a


    Jan 4, 2009
    San Antonio, Texas
    I know this is old, but I just took your script in Sierra and it worked fine.

    Just in case anyone still had this burning question ;-)

Share This Page