Re: Help -- how do I change the "to" "subject" of an open email in Mail? [Aside]
Re: Help -- how do I change the "to" "subject" of an open email in Mail? [Aside]
- Subject: Re: Help -- how do I change the "to" "subject" of an open email in Mail? [Aside]
- From: kai <email@hidden>
- Date: Tue, 16 Jan 2007 04:35:23 +0000
On 16 Jan 2007, at 01:54, Peter Payne wrote:
Any help from others on the list about how I can "write" the CC
field of the current open Mail message would be greatly appreciated.
This is possible when scripting the creation of a new outgoing
message, Peter. The following, for example, should work:
--------------
tell application "Mail"
set new_message to make outgoing message ¬
with properties {subject:"test", visible:true}
tell new_message to make cc recipient ¬
with properties {address:"email@hidden"}
end tell
--------------
However, a problem arises with messages that have been created
manually, or have been saved, closed and then reopened. I'm afraid
it's just one of a number of Mail scripting issues.
Until the situation improves, you might like to try a workaround that
relies on GUI scripting (which should therefore be enabled):
--------------
set CC_address to "email@hidden"
tell application "System Events" to tell process "Mail"'s window 1
tell text field 1 of scroll area 2 to if exists then
set value of attribute "AXFocused" to true
set value of attribute "AXValue" to CC_address
end if
tell scroll area -1 to if exists then ¬
set value of attribute "AXFocused" to true
end tell
--------------
---
kai
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden