我正在尝试列出缺少截止日期的应用程序中的所有提醒,但出现上述错误。任何机构都知道在这种情况下如何检查缺失值?
代码如下:
set remListOut to ""
set curDate to current date
tell application "Reminders"
activate
repeat with theRemList in remLists
tell list "@Call"
set remList to (every reminder whose due date is missing value)
repeat with theRem in remList
log (get properties of theRem)
set remListOut to remListOut & name of theRem & "
"
end repeat
end tell
end repeat
end tell
return remListOut
答案 0 :(得分:0)
我认为这是一个错误,代码正确。
作为解决方法,请使用第二个循环
set remListOut to ""
set curDate to current date
tell application "Reminders"
repeat with aList in lists
repeat with aReminder in reminders of aList
if due date of aReminder is missing value then
log (get properties of aReminder)
set remListOut to remListOut & name of aReminder & return & tab & tab
end if
end repeat
end repeat
end tell
return remListOut