The problem
In a script I'm using AppleScript to reload the browser when a change happens. I start this in the builtin terminal of my IDE, WebStorm. Since MacOS Catalina this yields the following error:
English
execution error: System Events got an error: osascript is not allowed to send keystrokes. (1002)
German/Deutsch
execution error: „System Events“ hat einen Fehler erhalten: osascript ist nicht berechtigt, Tastatureingaben zu senden. (1002)
The solution
I added /usr/bin/osascript
and WebStorm.app via 'Choose File' dialog to System Preferences > Security & Privacy > Privacy > Accessibility
(German/Deutsch: Systemeinstellungen > Sicherheit > Datenschtuz > Bedienungshilfen
).
But since Catalina/Mojave it must also appear under the new section Automation. Only there is no 'Choose File' dialog and when running the script no confirmation dialog pops up so (un)checkable entry is created.
How can I allow System Events under System Preferences > Security & Privacy > Privacy > Automation
?