Created
April 3, 2015 22:19
-
-
Save ace-dent/45f71c2aeb254db1eecd to your computer and use it in GitHub Desktop.
Insert today's date in Mac OS X. Add as a Service via Automator using AppleScript, to create a Shortcut.
This file contains 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 | |
# TODAY - Returns today's date! | |
# Create your own Service, to avoid 3rd Party software (WordService, etc.) | |
# In Automator: | |
# > Service receives 'no input' in 'any application' | |
# > Output replaces selected text | |
# Add Shortcut (e.g. Ctrl+Cmd+T - it's hard to find a free shortcut!): | |
# > Preferences > Keyboard > Keyboard Shortcuts > Services | |
# When setting up Keyboard Shortcut, *exit* the target app before testing. (It seems shortcuts are only refreshed when app is launched) | |
# Adjust 'Short' Date format | |
# > Preferences > Language & Text > Region. | |
return short date string of (get current date) | |
end run | |
# Sources: | |
# http://apple.stackexchange.com/questions/100642/how-to-make-an-existing-applescript-file-to-work-as-a-service | |
# http://henrysmac.org/blog/2014/1/4/formatting-short-dates-in-applescript.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this :)