<div class="markdown">
<p dir="auto">On 7 Nov 2014, at 13:20, Nick Renders wrote:</p>
<blockquote>
<p dir="auto">I have a question about MailMate and AppleScript.</p>
<p dir="auto">I would like AppleScript to create a Reply email to the selected message<br>
and automatically add some text to it. I understand you can do this with<br>
the "open location" command and setting all the necessary parameters like<br>
"subject", "body" and "in-reply-to".</p>
</blockquote>
<p dir="auto">Well, that's primarily for new messages and not replies. The <a href="http://manual.mailmate-app.com/emate"><code>emate</code></a> command can also be used for this when it's more convenient.</p>
<blockquote>
<p dir="auto">My question is: can I get the value for those parameters for the selected<br>
message with AppleScript? Or is there perhaps a better/easier way to<br>
create a Reply email with AppleScript? I have been thinking about using the<br>
COM+R shortcut through System Events, but that seems like bit of a hassle.</p>
</blockquote>
<p dir="auto">The best way to do this is to use a bundle command. This is still badly documented (and incomplete), but it might work well enough for you. To help you out I've created a bundle which you should place in this folder (create it):</p>
<pre><code>~/Library/Application Support/MailMate/Bundles/
</code></pre>
<p dir="auto">I've added a single command named “Generate Reply”. It calls a bash script, but it could be any kind of script (Ruby, Python, AppleScript, …). It just has to return a property list specifying a <code>replyMessage</code> action (as also shown by my example). You can find the command in the “Command ▸ Arcict” menu after saving the bundle. The only documentation is <a href="http://www.mail-archive.com/mailmate%40lists.freron.com/msg02477.html">this mailing list message</a>.</p>
<p dir="auto">Depending on what exactly you are trying to do, you might need more help, but this is a starting point.</p>
<p dir="auto">-- <br>
Benny</p>
</div>