我目前正在尝试自定义一个正在阅读收件箱中未读邮件的 AppleScript。除了我无法#T设法获取邮件日期之外,这基本上可以正常工作。
经过大约 2 小时的谷歌搜索后,我发现我需要的变量应该是 receiveate 或 deliverydate,但是当尝试使用其中一个时,我收到如下错误:
"...receivedate of id... cannot be converted to Type reference..."
有人有一个想法,我该如何转换?
这是我当前的代码:
tell application "System Events"
set processList to (name of every process)
end tell
if processList contains "Mail" then
tell application "Mail"
if (unread count of inbox) > 0 then
set messageList to (messages of inbox) whose read status is false
set output to "Mails:" & return & return & ""
repeat with itemNum from 1 to (unread count of inbox)
set itemDate to (receivedate of item itemNum of messageList)
set output to output & itemDate & " - " & (extract name from sender of item itemNum of messageList) & return & subject of item itemNum of messageList & return & return
end repeat
end if
end tell
else
set output to "ÄpplMäil isch aus..."
end if