Does anyone know how to make it so I can toggle a calendar that shows up in Apple Calendar from a Google calendar I sync to it? Not sure if the Google calendar makes a difference or not. Here is an example of what I have so far that is not working.
tell application "Calendar"
set calendarList to calendars
for calendar in calendarList
if calendar's name = "Work Appointments" then
set visibility of calendar to not (calendar is visible)