使用选择列表而不是收件箱时的Applescript错误1700

时间:2015-05-15 18:52:09

标签: list email applescript

我是AppleScript的新手,我遇到了一个简单的问题:

tell application "Mail"
    -- this works:
    set mylist to subject of every message of inbox

    -- but why this does not work? (error 1700)
    set mylist to subject of every message of selection

end tell

1 个答案:

答案 0 :(得分:0)

错误1700表示“不能使«脚本»成为类型项”。尝试以列表形式浏览选择:

set mylist to {}
repeat with amessage in (selection as list)
    copy subject of amessage to end of mylist
end repeat