Re: Need help with Mail Applescript.
Re: Need help with Mail Applescript.
- Subject: Re: Need help with Mail Applescript.
- From: cricket <email@hidden>
- Date: Mon, 20 Jan 2003 10:47:00 -0800
If you're running 10.2.3, you could give this a whirl:
tell application "Mail"
set selectedMailboxes to selected mailboxes of message viewer 1
repeat with eachMailbox in selectedMailboxes
set everyFlagged to (every message of eachMailbox whose flagged
status is true)
repeat with eachMessage in everyFlagged
set mailbox of eachMessage to mailbox "Foo"
end repeat
end repeat
end tell
This script will go through the messages in the mailboxes you have
selected in the Mail viewer window, find messages that are flagged and
copy them to a local mailbox named "Foo". Change the name "Foo" to
correspond to your local mailbox where you'd like these messages
archived. Setting the mailbox of a message to a new mailbox will also
delete the message in the source mailbox, so there is no need for a
delete operation after the move.
Hope this helps,
- cricket
On Sunday, January 19, 2003, at 8:09 AM, montana wrote:
I want to write a script that takes messages I've flagged out of Mail
and backs them up.
I can set up preferences to flag specific messages when they are
downloaded and then I could use this script periodically to back them
up and delete copies plus delete any unflagged messages I may have
missed.
I think this would be helpful since I am subscribed to a couple of
different programming lists.
Any idea how to do this with Applescript and Mail?
Thanks.
SA
:)
_______________________________________________
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.
----->
Software Entomologist Mail for Mac OS X
http://www.apple.com/macosx/jaguar/mail.html
---------->
Weird love is better than no love.
_______________________________________________
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.