1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

"Script" to copy date and time to clipboard

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

  1. macrumors newbie

    #1
    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. macrumors 6502a

    #2
    This should work

    Code:
    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