Same problem here. I'm just trying to call a menu item in another app.
Testing on Monterey 12.3.1.
Running NSAppleScript::executeAndReturnError.
I've set NSAppleEventsUsageDescription.
I've got the entitlement com.apple.security.automation.apple-events.
I've also got com.apple.security.temporary-exception.apple-events for the target app.
I'm successfully notarised and installer is stapled.
This thread is enlightening but I still can't run an AppleScript.
https://stackoverflow.com/questions/70548909/how-to-run-applescript-from-c-in-macos-sandbox-environment-without-entitlement
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags: