Issue:
ERROR Message: “is not allowed to send keystrokes”
Script:
--MyApp.app
tell application "Safari"
activate
delay 3
activate
tell application "System Events"
keystroke "w" using {command down} -- closes window
end tell
end tell
Troubleshooting:
OS Tests
- this script / app does work in Monterey but doesn’t work in Ventura.
Script Editor
In script editor it runs without error message but not as an App
Setting Setup
- Permissions for script editor in Privacy (+ Added to ) >
- Accessibility
- Automation
- Full Disk Access
As an App
- export
- save as an app
- open app
- get the is not allowed to send keystrokes