Re: Referencing a Message in Mail 6.1 - Huh?
Re: Referencing a Message in Mail 6.1 - Huh?
- Subject: Re: Referencing a Message in Mail 6.1 - Huh?
- From: Shane Stanley <email@hidden>
- Date: Wed, 03 Oct 2012 08:53:39 +1000
On 03/10/2012, at 8:08 AM, Ron Hunsinger <email@hidden> wrote:
No. The problem is that Mail's dictionary defines "message id" as a property of a message. Something as simple as
tell application "Mail" get source of message id 1 end tell
parses "message id" as a single token, and then doesn't know what to do with the following number. You get a syntax error. It doesn't matter whether there is a message whose id is 1, nor whether Mail can locate the message by just its id, because the syntax error prevents the script from ever running.
That was my initial thought, but I don't think it's the real problem. Enter the following with suitable id and mailbox name:
tell application id "com.apple.mail" -- Mail.app message «class ID » 204357 of mailbox "Anna scripting" end tell
When you compile it (once), you will get:
tell application id "com.apple.mail" -- Mail.app message id 204357 of mailbox "Anna scripting" end tell
Notice the different styling of message and id. Yet the script still fails.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden