From 3eedba78dd8be4009615bd6189bdcc9fdbf6a503 Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Tue, 26 Sep 2023 19:49:06 -0700 Subject: [PATCH] Improve Calendar access alert messaging --- ocu/calendars/get-calendar-events.applescript | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ocu/calendars/get-calendar-events.applescript b/ocu/calendars/get-calendar-events.applescript index 5a46713..ffd316f 100644 --- a/ocu/calendars/get-calendar-events.applescript +++ b/ocu/calendars/get-calendar-events.applescript @@ -187,11 +187,8 @@ on run(listOfCalNames) -- authorization set authorizationStatus to current application's EKEventStore's authorizationStatusForEntityType:0 -- work around enum bug if authorizationStatus is not 3 then - display dialog "Access must be given in System Preferences" & linefeed & "-> Security & Privacy first." buttons {"OK"} default button 1 - tell application "System Preferences" - activate - tell pane id "com.apple.preference.security" to reveal anchor "Privacy" - end tell + display dialog "Access must be given in System Settings" & linefeed & "-> Security & Privacy first." buttons {"OK"} default button 1 + tell application "System Settings" to activate -- Explicitly abort the script with an error error number -128 end if