Subscribing to a Calendar
You can use the GetURL
command to subscribe to a remote calendar with a specified URL, as shown in Listing 5-1 and Listing 5-2.
APPLESCRIPT
tell application "Calendar"
GetURL "webcal://files.apple.com/calendars/US32Holidays.ics"
end tell
JAVASCRIPT
var Calendar = Application("Calendar")
Calendar.geturl("webcal://files.apple.com/calendars/US32Holidays.ics")
Unlike some of Calendar app’s other commands, the GetURL
command doesn’t produce a result. It also causes Calendar to display a confirmation dialog, which must be manually accepted by the user before the subscription is complete. See Figure 5-1.
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-09-13