JetThoughts

Add current date to text document

April 4th 2011

Often we need to add current date to text document. For Mac users we have awesome tools as Automator and AppleScript. We need to do five simple steps:

1) Create a new workflow with template “Service” in Automator

2) Choose ‘Service receives’ to “no input” in “any application”

3) Add action “Run AppleScript” with content:

1 on run {input, parameters}
2   tell application "System Events"
3     keystroke (short date string of (current date))
4   end tell
5   return input
6 end run

4) Save the service

5) Go To “System Preferences –> Keyboard –> Keyboard Shortcuts –> Services” and setup a shortcut for the service and enable it.

blog comments powered by Disqus

Powered by Rackspace Cloud Computing