Apple Script For Pasting The Current Date

I'm a big fan of taking notes with Evernote and wanted a way to paste the current date time into the note, or for that matter into anything I was working on.


The basic instructions for getting this setup can be found here.

Making the workflow

Create a simple service in Apple Automator that receives no input in any application, save it as something like "paste_date":

Apple automator script window

The Code

Here is the code I used:

set newTxt to ((current date) as string)
set the clipboard to newTxt
tell application "System Events" to keystroke "v" using {command down}

Creating the Shortcut

In the Keyboard Preferences create a new shortcut for this service:

Keyboard shortcut command window

That's it! Now in any application you can just press command-shift-d and paste the date:

Thursday, January 5, 2012 10:47:22 AM

If you enjoyed reading this or learned something, please consider sharing via , , or . Thanks!

If you enjoyed this article, you might like others related to the Software interest.