Applescript Copy Paste Help!

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

  1. macrumors newbie

    Joined:
    Jun 17, 2008
    #1
    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

    Joined:
    Jul 23, 2002
    Location:
    OR
    #2
  3. macrumors newbie

    Joined:
    Sep 26, 2008
    #3
    where do I ask a question?
     
  4. macrumors 65816

    mysterytramp

    Joined:
    Jul 17, 2008
    Location:
    Maryland
    #4
    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:

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

    mt
     

Share This Page