【问题标题】:getting both event summary AND present status from ical using applescript or the terminal?使用 applescript 或终端从 ical 获取事件摘要和当前状态?
【发布时间】:2010-12-11 08:08:29
【问题描述】:
我正在尝试查询 iCal 以了解当前是否正在发生特定日历中的事件,如果是,事件的名称是什么 - 使用 applescript 或终端(我真的不太了解关于任何一个)。我看到了一个类似的问题,关于使用 applescript 来检索当天事件的 all 的摘要,但这并不是我想要的。 (Applescript and iCal interaction)。
有什么想法吗?
【问题讨论】:
标签:
terminal
applescript
icalendar
【解决方案1】:
使用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)之前,否则会报错。