Skip to content

Instantly share code, notes, and snippets.

@TwistingTwists
Created April 12, 2019 14:23
Show Gist options
  • Save TwistingTwists/8be4c769ffceb7dd77e239fe9968da36 to your computer and use it in GitHub Desktop.
Save TwistingTwists/8be4c769ffceb7dd77e239fe9968da36 to your computer and use it in GitHub Desktop.
Date Time AppleScript
-- use it as service of automator
on run {input, parameters}
do shell script "date +%Y-%m-%d\\ %H.%M.%S"
set the clipboard to input & " - " & result as text
tell application "System Events"
the path to the frontmost application
the name of the result
the text 1 thru ((offset of "." in the result) - 1) of the result
tell process result to keystroke "v" using command down
end tell
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment