O$ 10.22 AppleScript Error (Not authorized to send Apple events to Calendar.)
Mike Matthews - Omnis
omnis at lineal.co.uk
Wed Nov 9 18:38:39 UTC 2022
Hello All,
An odd problem has arisen with new Macs and Monterey. Just missed it until now really. When I run and AppleScript to fetch events from iCal, I get a warning 'Not authorized to send Apple events to Calendar.’ I can launch iCal/Calendar however, but not control it.
This is the reported error text:
'Not authorized to send Apple events to Calendar.'
On my older Mac that is still using Intel chip and OSX 10.15, all is fine, but on newer M1, Monterey, I can’t seem to get the security setup right.
I have reset using 'tccutil reset AppleEvents’ so I get the prompt to allow security to be allowed, but the setting is not made. Looking at the Calendars in Security & Privacy pane, no apps are shown.
Is this just me, or are others failing as well?
Begin text block
Text:tell application "iCal"(Carriage return)
Text:launch(Carriage return)
Text:end tell(Carriage return)
End text block
Get text block lvScript
Do $runapplescript(lvScript,lvResult,lvApplescriptError) Returns lvErrCode
If len(lvApplescriptError)
OK message {Encountered Error: [lvApplescriptError]}
Calculate lvFlagOK as kFalse
End If
If lvFlagOK
Begin text block
Text:tell application "iCal"(Carriage return)
Text:set theCalendarNames to name of every calendar(Carriage return)
Text:end tell(Carriage return)
End text block
Get text block lvScript
Do $runapplescript(lvScript,lvResult,lvApplescriptError) Returns lvErrCode
End If
Thanks
Mike Matthews
Lineal Software Solutions
Commercial House, The Strand<x-apple-data-detectors://1/1> Barnstaple, Devon, EX31 1EU<x-apple-data-detectors://1/1>
omnis at lineal.co.uk<mailto:mike.matthews at lineal.co.uk>
www.lineal.co.uk<http://www.lineal.co.uk/>
www.sqlworks.co.uk<http://www.sqlworks.co/>
More information about the omnisdev-en
mailing list