Is there a quick way to keep certain text perpetually ready-to-paste?

Discussion in 'macOS' started by Whackintosh, Jan 30, 2010.

  1. Whackintosh macrumors 6502

    Joined:
    Mar 8, 2009
    #1
    I'm thinking, specifically, my address. It would be great if there was a shortcut that would let me paste in my full address whenever I need to drop it into an email. I'd assume there must be some kind of way to do it, but I've been searching and can't find anything. Could anyone hit me with a tip?
     
  2. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
  3. JNB macrumors 604

    JNB

    Joined:
    Oct 7, 2004
    Location:
    In a Hell predominately of my own making
    #3
    You could also use Stickies. I have a lot of boilerplate language I use for various things, and it's perfect for the task. Granted, it's not an "instant-menu-dropdown-clipboard-history" thing, but it's already there, lightweight, and easily called up with Spotlight. Takes mere seconds to get what I need.
     
  4. andmr macrumors member

    Joined:
    Aug 25, 2008
    Location:
    NE Florida
    #4
    You might also consider using AppleScript.

    The first example script below makes use of the Clipboard. Copy the code and paste it into your AppleScript Editor (a.k.a. the Script Editor in systems prior to 10.6). From the Editor's File menu select Save As > File Format: application, and leave the Options unchecked. Once properly saved, the script must be run from the Dock or from the Script Menu.

    When the insertion point is placed in the desired spot in a document (in Mail, or in whatever application), simply click on the script's docked icon, or select the script from the Script Menu. The predefined text will automatically be sent to the Clipboard and then pasted at the insertion point.

    First example script (uses the Clipboard):

    set the clipboard to "My Name" & return & "123 Main St." & return & "Anytown, Somestate 12345" & return
    tell application "System Events"
    keystroke tab using command down
    keystroke "v" using command down
    end tell


    Naturally, the values "My Name", "123 Main St." etc. will need to be modified accordingly.

    Another approach would be to bypass the Clipboard altogether. The second example types out the predefined text directly from the script itself, thus leaving the contents of the Clipboard intact. You might find Full Key Codes to be a great help when modifying this one. As with the first example, the script needs to be saved as an application and must be run from the Dock or from the Script Menu.

    Second example script (doesn't use the Clipboard):

    tell application "System Events"
    keystroke tab using command down
    keystroke "My Name" & return
    key code 18
    key code 19
    key code 20
    keystroke " Main St"
    key code 47
    keystroke return
    keystroke "Anytown, Somestate "
    key code 18
    key code 19
    key code 20
    key code 21
    key code 23
    keystroke return
    end tell


    Hope this helps.
     
  5. riscy macrumors 6502a

    riscy

    Joined:
    Jan 4, 2008
    Location:
    China
    #5
    Butler, which has many other features does this, and you can also assign keystrokes to speed up adding the text. In my opinion, a killer app. You can find a link to it in my signature.
     
  6. Buzz Bumble Guest

    Joined:
    Oct 19, 2008
    Location:
    New Zealand
    #6
    In Microsoft Word you can add to the auto-correction function so that typing "myadd" (for example) auto-expands to your full address.

    I dont know if it exists for Mac OS X, but there used to be an application called TypeIt4Me which did the same thing on a system-wide level. I use it on my MacOS 9 computer so that typing "e-m" auto-expands to my email normal address, "b-b" auto-expands to my Buzz Bumble email address, etc.
     

Share This Page