I have a new Mail message window opened. How to set it's Subject via Applescript?

Discussion in 'Mac Programming' started by madsylar, Aug 29, 2013.

  1. madsylar, Aug 29, 2013
    Last edited: Aug 29, 2013

    macrumors member

    Joined:
    May 5, 2010
    #1
    Hi,

    All the examples I've found create a new message then set it's subject via applescript like this:

    set newMessage to make new outgoing message with properties {account:theAccount, subject:theSubject, content:theContent}

    However I'm looking for a way to set the Subject and Recipient of an existing message in the frontmost window, like this:

    http://cl.ly/image/2Z0u0M0J050R

    Is it possible?

    Thank you.
     
  2. thread starter macrumors member

    Joined:
    May 5, 2010
    #2
    found the solution: ui scripting.
     

Share This Page