Forked from mnicovideo/Insert Date and Time to selection.applescript
Created
July 4, 2018 19:50
-
-
Save dijikul/e62f4f74c94576f340ddc17711a452bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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