• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Add event to Calendar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add event to Calendar


  • Subject: Add event to Calendar
  • From: Bill Vlahos <email@hidden>
  • Date: Sat, 13 Sep 2014 22:19:52 -0700

I’m trying to create a new calendar event in the Calendar application and then edit the event so it is opened and ready to address and send out.

The following AppleScript successfully creates an event but it isn’t visible on the calendar until either I manually select Refresh Calendars in the View menu or wait until the Calendar syncs up with the server.

set calendarName to "Home"
set theSummary to "Event Title"
set theDescrption to "The notes for the event"
set theLocation to "Karl's House"
set startDate to "September 15, 2014 9:30:00 AM"
set endDate to "September 15, 2014 1:00:00 PM"


set startDate to date startDate
set endDate to date endDate

tell application "Calendar"
tell (first calendar whose name is calendarName)
make new event at end of events with properties {summary:theSummary, start date:startDate, end date:endDate, description:theDescrption, location:theLocation}
end tell
end tell

Questions:
1. How can I trigger an immediate refresh? The AppleScript dictionary command reload calendars doesn’t do it.
2. How can I trigger an immediate opening of the event?

Thanks,
Bill Vlahos
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Count word's occurences
  • Next by Date: Finder window properties
  • Previous by thread: Open BBEdit Recent Items
  • Next by thread: Re: Add event to Calendar
  • Index(es):
    • Date
    • Thread