Re: Scripting Apple Mail
Re: Scripting Apple Mail
- Subject: Re: Scripting Apple Mail
- From: Rob Stott <email@hidden>
- Date: Wed, 30 Apr 2003 17:06:27 +0100
Thanks for the hint, John. That seems to be working!
r.
On Wednesday, April 30, 2003, at 11:01 am, John Delacour wrote:
At 9:21 am +0100 30/4/03, Rob Stott wrote:
Hi all, I'm hoping one of you can help me with a simple problem
scripting Apple Mail (I'm probably making a daft mistake).
The daftness is not yours unless you hear otherwise.
I want the script below to read the content of the first message of a
particular mailbox, then delete the message.
It reads the content perfectly, but fails to delete the message,
giving me a "Mail got an error: An error of type 8 has occurred"
message.
You can't 'move' or 'delete' anything in Mail. Prepare for a lot of
scrunchy disk noise and perform this contorted operation instead:
tell application "Mail"
tell account 1
tell mailbox "INBOX"
set m to a reference to its first message
set s to m's content
end tell
end tell
set m's mailbox to mailbox "Deleted Messages"
end tell
s
_______________________________________________
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.
_______________________________________________
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.