You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Top-ranking reply

Posted on Apr 24, 2022 8:28 AM

Make it an Automator Quick Action as in the following example, and it will insert the date string in any application that can receive text input. The ISO8601 date format standard does not incorporate dots as punctuation. Same result whether you use the Bash or Zsh shell.


Tested: macOS 12.3.1


Similar questions

1 reply

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.