Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Applescript: Insert Date and A Horizontal Divider Line
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
You can’t perform that action at this time.