Skip to content

Instantly share code, notes, and snippets.

@bulbil
Created May 16, 2020 22:32
Show Gist options
  • Select an option

  • Save bulbil/fe5788d49311f0319efabb00b380499f to your computer and use it in GitHub Desktop.

Select an option

Save bulbil/fe5788d49311f0319efabb00b380499f to your computer and use it in GitHub Desktop.
on run {input, parameters}
set the clipboard to (do shell script "date +%Y-%m-%d")
tell application "System Events"
keystroke "v" using {command down}
end tell
return input
end run
@bulbil
Copy link
Author

bulbil commented Jun 18, 2020

  • New Automator Quick Action workflow
  • System Preferences > Security & Privacy > Accessibility
      • Automator
      • Script Editor
  • System Preferences > Keyboard > Shortcuts > Services > [scroll to bottom] > General > your workflow
  • If you know ahead of time which apps in which you'll use this, add them to Security & Privacy > Accessibility
  • If not, adding a new one is a three step process:
    1. Alert 1: “Sublime Text.app“ wants access to control “System Events.app“. Allowing control will provide access to documents and data in “System Events.app“, and to perform actions within that app.
    2. Alert 2: The action “Run AppleScript” encountered an error: “System Events got an error: com.automator.runner.xpc is not allowed to send keystrokes.
    3. App has been added to Security & Privacy > Accessibility list, but you still need to authenticate and select the checkbox to enable the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment