所以到目前为止我编写了这段代码,它工作得很好,唯一的问题是,两次调用代码导致错误«脚本»不理解 Remi 消息。(-1708)
这里有什么要指出的,我如何在触发后取消设置处理程序?
编码:
my Remi()
on Remi()
set cD to (current date)
tell application "Reminders"
--set output to name of reminders
if (count of (reminders whose completed is false)) > 0 then
set output to ""
set todoList to name of reminders whose completed is false
repeat with itemNum from 1 to ((count of (reminders whose completed is false)))
try
set Remi to item itemNum of reminders
set remiT to due date of Remi
set tim to time string of remiT
set dD to date string of remiT
set nN to name of Remi
if remiT ≤ cD then
set val to (tim & " - " & nN & " $$" & dD & "/ENDE")
set output to (output & val & return)
end if
end try
end repeat
else
set output to "No reminders available"
end if
end tell
return output
end Remi
谢谢帮助