0
我想查询iCal以查明特定日历中的事件现在是否正在发生,如果有,事件的名称是什么 - 使用applescript或终端(我真的不太了解其一)。我看到一个类似的问题,关于使用applescript检索当天事件的所有的摘要,但那不是我正在寻找的。 (Applescript and iCal interaction)。使用applescript或终端从ical中获取事件摘要和当前状态?
有什么想法?
我想查询iCal以查明特定日历中的事件现在是否正在发生,如果有,事件的名称是什么 - 使用applescript或终端(我真的不太了解其一)。我看到一个类似的问题,关于使用applescript检索当天事件的所有的摘要,但那不是我正在寻找的。 (Applescript and iCal interaction)。使用applescript或终端从ical中获取事件摘要和当前状态?
有什么想法?
使用filter form:
tell application "iCal"
get every event of calendar cal ¬
where (start date ≤ (current date)) and (end date > (current date))
end tell
注意start date
和end date
必须(current date)
之前来,否则你会得到一个错误。
不应该是≤和≥? – 2010-12-11 17:22:08
@Antal:这取决于。我会用≤和>去。 – outis 2010-12-11 17:30:31