Applescript或Terminal:在日历上添加活动

时间:2016-07-07 11:10:46

标签: macos terminal calendar applescript

我尝试从终端

制作日历活动

这是我的代码

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

它正在做这个工作,但它真的很慢,需要打开日历, 有没有更快的方法,如果可能的话,不打开日历?

谢谢

1 个答案:

答案 0 :(得分:0)

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

相关问题