1 Reply Latest reply: Jan 21, 2012 9:39 AM by twtwtw
enigma2k Level 1 Level 1 (0 points)



I am looking for an simple Apple Script that can copy any selected text, start TextEdit and paste it in. I have managed to do this with the clipboard but I would like it to work without clipboard. So that it copies the selected text to a variable and paste it from the variable afterwards.


Is there any easy solution to this?

MacBook Air, Mac OS X (10.7)
  • twtwtw Level 5 Level 5 (4,900 points)

    if you're talikng about copying selected text anywhere, the easy solution is to use an automator service. 

    1. launch automator
    2. choose service
    3. choose 'receive selected text in any application' at the top - should be the default
    4. use the 'New TextEdit Document' action or the 'Set Contents of TextEdit Document' action, depending on what you need
    5. save, and run from the services menu

    if you want to select text from a specific application then you can use automator or get more fine-grained control by using Applescript, but appllescript doesn't have an easy way to get generic selected text.