Re: Accessing front window of Mail.app
Re: Accessing front window of Mail.app
- Subject: Re: Accessing front window of Mail.app
- From: Christopher Stone <email@hidden>
- Date: Sun, 6 Sep 2009 19:47:58 -0500
On Sep 06, 2009, at 12:17, Mike Matthews wrote: I'd like the script to operate on an open outgoing message window that is front-most.
______________________________________________________________________
Hey Mike,
Unfortunately scripting support for outgoing messages in Mail is completely abysmal (shocking and infuriating considering how mature a product it is).
This is pretty reliable BUT you must SAVE the outgoing message for it to work, and you can run into trouble if you have more than one draft message with the same subject.
tell application "Mail" set winName to name of front window set msg to last message of drafts mailbox whose subject is winName
tell msg set mRecip to {name, address} of every recipient set mContent to content set mSubject to subject set mSender to sender set mDate to date sent -- properties end tell end tell
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden