使用选择列表而不是收件箱时出现 Applescript 错误 1700
Applescript error 1700 when using list from selection instead of inbox
我是 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
错误 1700 表示 "Can’t make «script» into type item"。尝试以列表形式遍历所选内容:
set mylist to {}
repeat with amessage in (selection as list)
copy subject of amessage to end of mylist
end repeat
我是 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
错误 1700 表示 "Can’t make «script» into type item"。尝试以列表形式遍历所选内容:
set mylist to {}
repeat with amessage in (selection as list)
copy subject of amessage to end of mylist
end repeat