Applescript Copy Paste Help!

Discussion in 'Mac Programming' started by peleus, Jun 17, 2008.

  1. macrumors newbie

    Jun 17, 2008
    Hi All,

    This is probably a very simple solution but my best efforts are not good enough to figure this one out. Does anyone know the general form of how to copy and paste in applescript. I am trying to copy text from a txt file into the body of a new message in entourage mail. I can open the text file, and even open a new mail message in applescript. Reading the manuals and dictionaries are confusing since I am not even sure which command is appropriate, get, set, duplicate, or none of the above.

    Thank you all for your help
  2. macrumors regular

    Jul 23, 2002
  3. macrumors newbie

    Sep 26, 2008
  4. macrumors 65816


    Jul 17, 2008
    And you might not need to use the clipboard either. Put the text into a variable, then set the appropriate container in Entourage to that variable.

    I googled Entourage and Applescript and found an article at MacTech. Here's a code snippet that might help get you started:

    set theSubject to "Some Subject"
    set theBody to "Some Body"
    tell application "Microsoft Entourage"
       make new outgoing message with properties 
    {subject:theSubject, content:theBody}
    end tell
    --> outgoing message id 11285 of application "Microsoft Entourage"


Share This Page