• 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
Re: Add event to Calendar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add event to Calendar


  • Subject: Re: Add event to Calendar
  • From: Bill Vlahos <email@hidden>
  • Date: Sun, 14 Sep 2014 07:49:47 -0700

Christian,

Thanks for the feedback. BTW I’m on Mavericks 10.9.4

Oh that’s interesting. I had only tried it on my “Home” calendar where there is the reproducible delay I described. If I add it to any of the other calendars the event shows up instantly (I’m showing all of the calendars). Even when I am adding the event to the Home calendar the script pops up the Info window on it which is weird because you don’t yet see the event on the calendar.

I wonder why there is a delay for the Home calendar. Anyone have an idea?

Here is the complete AppleScript that will not only create the event but also bring up the Info pane to let the user add invitees, etc. I have to show the event so it is highlighted so the keystroke command has the event to work with. 

set calendarName to "Work"
set theSummary to "Title of the event goes here"
set theDescrption to "Description of event goes here."
set theLocation to ""
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" to activate
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}
copy the result to vEventInfo
end tell
show vEventInfo
end tell

tell application "System Events"
keystroke "i" using command down
end tell

Bill Vlahos


On Sep 14, 2014, at 6:20 AM, Christian Boyce <email@hidden> wrote:

Over here your script makes an event in my "Home" calendar instantly, as long as I am showing the "Home" calendar.

10.8.5.

c
On Sep 14, 2014, at 12:19 AM, Bill Vlahos <email@hidden> wrote:

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


--
Christian Boyce
Christian Boyce and Associates
Mac, iPhone, and iPad Consultants

For appointments, please call the office: 424-354-3548.
We do not make appointments by email or text.

Read the Boyce Blog: http://christianboyce.blogspot.com
Follow us on Twitter! http://twitter.com/christianboyce
Be a fan on Facebook! http://facebook.com/christianboyce.and.associates

Now Playing on The Boyce Blog: Thoughts on Apple's iPhone 6, 6 Plus, and the Apple Watch

(Join The Boyce Blog mailing list and never miss a post!)

Current weather in Santa Monica, CA: Fair, 71° F 


 _______________________________________________
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

  • Follow-Ups:
    • Re: Add event to Calendar
      • From: Bill Vlahos <email@hidden>
    • Re: Add event to Calendar
      • From: Paul Berkowitz <email@hidden>
References: 
 >Add event to Calendar (From: Bill Vlahos <email@hidden>)

  • Prev by Date: Re: Finder window properties
  • Next by Date: Re: Finder window properties
  • Previous by thread: Add event to Calendar
  • Next by thread: Re: Add event to Calendar
  • Index(es):
    • Date
    • Thread