Mail 2.0 problem
Mail 2.0 problem
- Subject: Mail 2.0 problem
- From: Christian Boyce <email@hidden>
- Date: Mon, 28 Nov 2005 22:43:07 -0800
In Mail 1.3.11 (OS 10.3.9) I can make an outgoing message by clicking "New" or typing Command-N, and if I care to fill in the content I can use a script like so:
<x-tad-bigger>tell</x-tad-bigger> application "Mail"
<x-tad-bigger>set</x-tad-bigger> mymsg <x-tad-bigger>to</x-tad-bigger> item 1 <x-tad-bigger>of</x-tad-bigger> outgoing messages
<x-tad-bigger>set</x-tad-bigger> content <x-tad-bigger>of</x-tad-bigger> mymsg <x-tad-bigger>to</x-tad-bigger> "blah blah"
<x-tad-bigger>end</x-tad-bigger> <x-tad-bigger>tell
</x-tad-bigger>That works fine as long as I only have one outgoing message on the screen. I haven't figured out how to target the frontmost outgoing message if there are more than one, but I can live with that.
In Mail 2.0 I can't do it. If i run the above script it fails. Interestingly, if I script the creation of a new email message, it works. That is, this works:
tell application "Mail"
set mymsg to make new outgoing message at end of outgoing messages
set content of item 1 of outgoing messages to "blah blah"
end tell
If I comment out the "set mymsg..." line, and instead make an outgoing message by using the UI, and then run the script, it fails. In fact, if I ask for the outgoing messages, I get...
{application "Mail} -- this is very weird, at least to me
(I expected a list of messages, which is what I get in 1.3.11).
How can I get around this? I don't want my script to create the outgoing mail message because the idea is that an email will already be on the screen, addressed and ready for content-- all I want to do is fill in the content of an existing new message.
Any ideas? Thanks...
cb
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden