title: Using Applescript to get the body text ( content ) of a loaded template
body: <p>I have a piece of applescript that creates a new mail message and then loads a template into that message.</p>
  
  <p>So far so good.</p>
  
  <p>I want to get the content ( body text ) after the template being loaded.
  How can I get the body content after loading the template?
  Reason is, I need to replace some text ("/date/") with a date.</p>
  
  <p>The body could be HTML or just plain text.</p>
  
  <p>I know how to get the content when an existing mail is selected, so it is questioned really only about this case.</p>
  
  <p>BTW, a secondary question. Now I use button click to load the template, but is there a better way, for example load the template directly by name?</p>
  
  <p>Thank you very much</p>
  
  <p>edit addition</p>
  
  <p>I'am a step further. It is solved for this problem.</p>
  
  <pre><code>First I did make a new email using 
  tell application mail
     -- make email and visible
     -- then for using the keystrokes and gui to get the template
     tell application system events
        tell process mail 
        -- tell window to get template - works fine
        -- SEE NOTE 1
        set _content to content of myMessage -- it doesn't work, message ID is there
        set the _content to (get the value of the last scroll area)  -- it doesn't work
        -- IN HERE I CANT'T get the content of the message, should be with the ui?
        -- if someone knows, please
        end tell
     end tell
     -- now I have to Activate the mail app. I didn't know
     activate --
     set _content to content of myMessage -- works
     set the clipboard to _content as string -- works almost
     --  SEE NOTE2
  </code></pre>
  
  <p>Note 1
  In here I can't get the content of the message, should be with the ui?
  if someone knows, please</p>
  
  <p>Note 2
  If I paste the clipboard, the text has a different font.
  How can I get the right type of font in my clipboard?</p>
  
  <p>Still searching for a better way for getting the template.</p>