Re: [AS List] Create New Message script for Apple Mail
Re: [AS List] Create New Message script for Apple Mail
- Subject: Re: [AS List] Create New Message script for Apple Mail
- From: Marc Glasgow <email@hidden>
- Date: Fri, 3 Oct 2003 02:45:50 -0400
This script works, in part because of the placement of the visible:true
property occurring prior to the call to add recipients. I searched the
archives for the specific bug you mentioned just a day or two ago
because I was having similar problems, and found that there is a
Mail.app scripting issue (bug?) where the call to be visible has to
occur in a call prior to the recipient list being added for it to work
right.
--------------
set OurBodyText to "This is the text of the message" as text
tell application "Mail"
try
set OurNewMail to make new outgoing message with properties [con't]
{visible:true, sender:"<email@hidden>", [con't]
reply to:"email@hidden"}
-- Note above visible:true is called prior to the next step,
-- as a separate call from adding the recipients. An issue
-- with mail requires this occur in this order for the recipient
-- list info to work correctly... Or else the recipients never
-- get updated and remain blank.
tell OurNewMail
make new to recipient at end of to recipients with properties
[con't]
{name:"Someone", address:"email@hidden"}
make new cc recipient at end of cc recipients with properties
[con't]
{name:"Another Tester", address:"email@hidden"}
end tell
set subject of OurNewMail to "This is the Example" as text
set content of OurNewMail to OurBodyText
on error
beep
display dialog "Unable to create another piece of mail or some
such!"
beep
end try
end tell
-------------
Cheers
=-= Marc Glasgow
Macintosh Consultant Tampa Florida since 1990
www.cyberpoet.net
On Thursday, October 2, 2003, at 04:46 PM,
email@hidden wrote:
Message: 12
Date: Thu, 2 Oct 2003 14:59:35 -0500
Subject: Create New Message script for Apple Mail
From: Lorin Rivers <email@hidden>
To: email@hidden
Geniusii,
I can't get the the Create New Message script that comes with Mac OS X
to actually finish making the email with my account. If I run it as a
different user (completely log out and log back in as a new user -- I
keep a vanilla user on my system for screen shots and testing) it works
fine...
What happens as me is that the new mail gets created, but it uses the
wrong account and the to recipient never gets filled in.
Anyone got a clue?
--
Lorin Rivers
Marketing Professional
<mailto:email@hidden>
<http://homepage.mac.com/lrivers>
512.478.8114
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.