Created
April 8, 2019 03:22
-
-
Save junjizhi/21d26fe95cf169ba7b8e6fa448616c04 to your computer and use it in GitHub Desktop.
Applescript: Insert Date and A Horizontal Divider Line
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
on run {input, parameters} | |
set _Date to short date string of (current date) | |
set _DividerLine to "-----------------------------------------------------------------------------------------------" | |
set clipboard_contents to (the clipboard) | |
set the clipboard to _Date & return & _DividerLine & return | |
tell application "System Events" to keystroke "v" using command down | |
delay 0.2 -- needed because otherwise the next command can run before the paste occurs | |
set the clipboard to clipboard_contents | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment