"Script" to copy date and time to clipboard

Discussion in 'Mac Programming' started by jerewrig, Sep 29, 2010.

  1. jerewrig macrumors newbie

    Sep 29, 2010
    I'm new to Applescripts/Automator. Basically I frequently need to add the time and date into notepad and word documents. I would like to have a keystroke that would copy the current time and date and automatically paste into whatever application I'm in, or just copy it to the clipboard. Any help would be greatly appreciate. Thanks.
  2. Hansr macrumors 6502a

    Apr 1, 2007
    This should work

    set {year:y, month:m, day:d} to current date
    d * 1000000
    result + m * 10000
    result + y
    result as string
    set the clipboard to result
    Then add it to something like Quicksilver in triggers or another command hot key assigning application.

Share This Page