After I updated to Mojave, I can no longer use the automator service I\'ve previously been using with the alert below.
UPDATE: Updating to the latest Public Beta (as of 4 August 2018) fixed the issue for me. Prior to this, the issue did persist in all public betas of Mojave.
Original reply:
Just wanted to let you know that both myself and another friend are experiencing this exact same problem, with different Automator workflows that use Applescript (different than yours). We have the problem occurring with both manual activation (Finder --> Services --> click item) and with keyboard shortcut activation.
Even stranger, the workflow performs beautifully when testing inside Automator.
I've filed a bug report through the Feedback Assistant, and suggest to anyone else who sees this that you do too! Squeaky wheel and all...
Automator - Permissions error. "The action “Run AppleScript” encountered an error: “Not authorized to send Apple events to System Events.”"
Automator workflow performing well inside Automator
I was still having issues sending keystrokes a few months after Mojave was released. For me, weirdly the fix was to go System Preferences -> Security and Privacy -> Privacy Tab -> Unlock the Lock with your password -> Remove (with the minus button) Automator from the list of Apps in the Accessibility Row. Maybe there was something from running the betas that needed to get deleted before my scripts could send keystrokes again.
Edit: After quitting System Preferences I was getting the alert error again. Re-adding Automator.app to the Accessibility row seems to have fixed this for now.
This is definitely a part of Mojave's new security framework. In terminal
try
osascript -e 'tell application "Finder"' -e 'set _b to bounds of window of desktop' -e 'end tell'
and you may receive:
36:42: execution error: Not authorized to send Apple events to Finder. (-1743)
What is supposed to happen on the first execution is the Finder opens a dialog box informing you that terminal
is requesting permission to send events to the Finder. If you allow it, then terminal
will get added to the Automation page in System Preferences > Security & Privacy > Automation
:
There's two issues that I see at the moment:
Others have written up more extensive information about this:
Hopefully this gets worked out before Mojave ships as it seriously impacts automation capabilities on macOS.
I had a similar error running AppleScript .app
applications. I received the following error:
Not authorized to send Apple events to Finder. (-1743)
A workaround is to export (File > Export
) or save (File > Save As
, holding Option
key to show Save As
) a new Application from the .scpt or .applescript source code. This generates a new .app application, which in my case ran successfully. The initial launch required approval (as well as some subsequent launches), and the application was added as an entry under Settings -> Security & Privacy -> Privacy -> Automation
.
if you don't get something like this when trying to run your apple script, and more over you don't see iTerm in your Automation section in Privacy Setting, then the simplest possible way may help: JUST RESTART your Mac ;) disclaimer: another reason for that situation on my side may be user switching.
Here is what I did that resolved the issue for me. I went to System Preferences > Security & Privacy > Accessibility (Options on left hand side) > (Enter system password) > Click Automator (or your app you want to enable) and TADA it works.