Revealing an Event
Use the show command to bring Calendar to the front and show a specified event, as demonstrated in Listing 10-1 and Listing 10-2.
APPLESCRIPT
tell application "Calendar"tell calendar "Project Calendar"show (first event where its summary = "Important Meeting!")end tellend tell
JAVASCRIPT
var app = Application.currentApplication()var Calendar = Application("Calendar")var projectCalendars = Calendar.calendars.whose({name: "Project Calendar"})var projectCalendar = projectCalendars[0]var events = projectCalendar.events.whose({summary: "Important Meeting!"})var event = events[0]event.show()
Copyright © 2018 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2016-09-13
