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

https://apple.stackexchange.com/questions/394275/com-automator-runner-xpc-is-not-allowed-to-send-keystrokes


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

Posted on Apr 24, 2022 8:17 AM

Reply

Similar questions

1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator / System Error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.