Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. (do-applescript "
  2. use AppleScript version "2.4" -- Yosemite (10.10) or later
  3. use script "CalendarLib" version "1.1.3" -- put this at the top of your scripts
  4. use scripting additions
  5.  
  6. set d1 to current date
  7. set d2 to d1 + 1 * hours
  8. set theStore to fetch store
  9. set theCal to fetch calendar "activities" cal type cal cloud event store theStore -- change to suit
  10. set theEvent to create event event store theStore destination calendar theCal event summary "A test event" starting date d1 ending date d2 event location "Around here" event description "some notes" without runs all day store event event theEvent event store theStore with future events
  11. return event identifier for event theEvent
  12. ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement