Automator / System Error
Hello I'm new to this field. Thanks for your understanding.
I have this small automator programme which works fine (Type the Date)
on run {input, parameters}
set dateString to do shell script "date +'%Y.%m.%d'"
tell application "System Events"
keystroke dateString
end tell
end run
When I'm trying to run it from system preferences/keybord/services I get this error
The action “Run AppleScript” encountered an error: “System Events got an error: Automator Workflow Runner (WorkflowServiceRunner, Type the Date) is not allowed to send keystrokes.”
I've activated the Apps (Automator, Script Editor and AppleScript Utility) as described in
It works fine in Pages when the Automator App is open.
My Mac version is 12.3.1
Where is the bug? Thanks
MacBook Pro 13″, macOS 12.3