-
-
Save greatghoul/6fa374d575c7327477dc8cdae64b5b5c 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