An AppleScript workflow fails to run with the following error:
SAppleScriptErrorAppName = FStream;
NSAppleScriptErrorBriefMessage = "Not authorized to send Apple events to FStream.";
NSAppleScriptErrorMessage = "Not authorized to send Apple events to FStream.";
NSAppleScriptErrorNumber = "-1743";
I am pretty sure this is because Alfred does not have "Automation" permissions in Security & Privacy.
Alfred has the following permissions enabled:
Contacts
Accessibility
Full Disk Access
However macOS is never prompting me to provide permission for "Automation".
I have tried the following resolutions:
- Delete & reinstall Alfred app (v4.0.8)
- Reset permissions via `sudo tccutil reset All`
Nothing works. macOS will correctly request permission for other apps and also for Alfred for Contacts/Accessibility etc. But never for Automation.
As such I am unable to run AppleScript workflows.
Here is the AppleScript workflow source:
on alfred_script(q)
tell application "FStream"
if (status) is greater than 0 then
stopPlaying
else
startPlaying
end if
end tell
end alfred_script