2016-07-07 83 views
0

我儘量讓來自終端的日曆事件添加事件,的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 

它做的工作,但它很慢,而且需要打開日曆, 任何更快的方式來做到這一點,如果可能的話,無需打開日曆?

謝謝

回答

0

如果刪除「激活」和「重裝日曆,它是速度更快。 它只是打開應用程序的日曆,但不顯示任何窗口!

相關問題