macOS Mojave, Automator “Not authorized to send Apple events to System Events.”

后端 未结 13 823
误落风尘
误落风尘 2020-12-24 00:42

After I updated to Mojave, I can no longer use the automator service I\'ve previously been using with the alert below.

  • In Security & Privacy, I already ch
相关标签:
13条回答
  • 2020-12-24 01:18

    I have solved the same issue using the below steps. Open Plist and add the below keys in it

    <key>NSAppleEventsUsageDescription</key>
    <string>Please give access to Export details to Outlook</string>
    

    You will get a confirmation pop up to allow or disallow when your application starts executes the script first time. if you click allow, it will execute the script.

    0 讨论(0)
  • 2020-12-24 01:19

    I ran into this problem today using a script I've had for literally a decade that automated rasterizing Illustrator files in Photoshop only to be told it doesn't have permission without a reason to give it. The solutions above don't work because it has nothing to do with System Events in my situation. I then tested and found out I have the same problem in literally every single app on my computer if using osascript. If I tell it in the script to open a file I get a permissions error, but for some absurd reason if I tell it in a script to close an already open file I suddenly get a permissions dialog:

    osascript -e "tell application \"Adobe Photoshop 2021\" to close current document saving no"
    

    Thought I'd post it here to help someone else in this exasperating predicament.

    0 讨论(0)
  • 2020-12-24 01:21

    I was trying to insert the current date into the Reminders app with a keystroke. Instead of using the recommended "Settings -> Security & Privacy -> Privacy -> Accessibility -> Automator", I had to add Reminders instead of Automator so that it would allow the keystroke command to be permitted. It is annoying that it only permits the action on the specific app but that seems to be the case.

    0 讨论(0)
  • 2020-12-24 01:22

    I faced same error opening gitk.

    Error in startup script: execution error: Not authorised to send Apple events to System Events. (-1743)


    SOLUTION

    Goto Settings -> Security & Privacy -> Privacy -> Automation -> Privacy tab and check the System Events checkbox.

    0 讨论(0)
  • 2020-12-24 01:22

    I had this error in Terminal.app on Catalina with the simple test script of osascript -e 'tell application "Finder" to display notification "some stuff".

    I was not getting the pop-up and did not find any helpful options in Settings -> Security & Privacy -> Privacy -> Automation -> Privacy (neither Automation, nor Full Disk Access). I also did not have any luck with tccutil reset AppleEvents; tccutil reset SystemPolicyAllFiles (other than unfortunately losing all my relevant preferences).

    For me, the issue was that I was running the command in tmux. Once I detached from tmux, running the same command in Terminal prompted me for the relevant permissions dialog. Once allowed and reattached to my tmux session, I still could not run the command in tmux (but ran in Terminal outside of tmux). At this point I killed my tmux session, launched a new session, and thereafter was able to run this command in tmux in Terminal.

    0 讨论(0)
  • 2020-12-24 01:28

    In my case I had to go:

    Settings & Privacy > Privacy > Full Disk Access (in the left hand panel) and add Automator

    I had also tried adding Automator to Accessibility as other answers suggested (which didn't initially work for me) so perhaps we need to add Automator in both places.

    0 讨论(0)
提交回复
热议问题