Re: Replying to Apple lists
Re: Replying to Apple lists
- Subject: Re: Replying to Apple lists
- From: Ben Waldie <email@hidden>
- Date: Fri, 31 Oct 2003 12:51:38 -0500
Steve,
This worked for me in Panther. In fact, I used it to reply to your
message...
tell application "Mail"
activate
set curMsg to item 1 of (get selected messages of message viewer 1)
set newMsg to reply curMsg with opening window and reply to all
set props to properties of cc recipient 1 of newMsg
delete every to recipient of newMsg
delete every cc recipient of newMsg
make new recipient at end of to recipients of newMsg with properties
{name:name of props, address:address of props}
end tell
-Ben
On Oct 31, 2003, at 11:59 AM, Steve Mills wrote:
OK. When replying to Apple mailing lists, we all know how annoying it
is to have to remember to reply to all, then Cut the cc address,
delete the to address, and Paste the real address there. I wrote a
script that uses System UI scripting to do this for me. However, it
doesn't always work, especially if I change the setting where the bcc
field is visible or not. So I thought I'd look at Mail's dictionary in
10.3. Looks like some things have improved a little, but I still can't
figure out how to delete existing recipients of a new outgoing
message. Here's what I have so far:
tell application "Mail"
activate
set curMsg to item 1 of (get selected messages of message viewer 1)
set newMsg to reply curMsg with opening window and reply to all
set props to properties of cc recipient 1 of newMsg
make new recipient at end of to recipients of newMsg with properties
{name:name of props, address:address of props}
delete cc recipients of newMsg
end tell
I tried deleting the cc recipient in a number of ways:
set cc recipients of newMsg to {} --This should work, but doesn't.
delete every cc recipient of newMsg --Should also work, but doesn't.
Any thoughts? I want to make this generic enough that it will work for
all of Apple goofy lists, so I don't want to hard code
email@hidden into the script, which is why I
decided to have the script reply to all so I could simply move the
correct address to the correct place. I'll also delete the original to
recipient before adding the correct one.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
Benjamin S. Waldie
President & CEO
Automated Workflows, LLC
484.744.1831
=============================================
AppleScript and Workflow Automation
Consulting - <
http://www.automatedworkflows.com>
AppleScript Info - <
http://www.applescriptguru.com>
AppleScript Training - <
http://www.applescripttraining.com>
=============================================
_______________________________________________
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.