【问题标题】:Applescript or Terminal : Add a event on calendarApplescript 或终端:在日历上添加事件
【发布时间】:2016-07-07 11:10:45
【问题描述】:

我尝试从终端制作日历事件,

这是我的代码

tell application "Calendar"
    activate
    tell calendar "Calendar"
        set theCurrentDate to current date
        make new event at end with properties {description:"Event Decription", summary:"Event Name", location:"Event Location", start date:theCurrentDate, end date:theCurrentDate + 510 * minutes}
    end tell
    reload calendars
end tell

它正在做这项工作,但它真的很慢,需要打开日历, 如果可能的话,有什么更快的方法可以在不打开日历的情况下做到这一点?

谢谢

【问题讨论】:

    标签: macos terminal calendar applescript


    【解决方案1】:

    如果您删除“激活”和“重新加载日历”,它会更快。 它只是打开应用程序日历,但不显示它的任何窗口!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多