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: Axel Luttgens <email@hidden>
- Date: Tue, 02 Oct 2012 09:23:58 +0200
Le 2 oct. 2012 à 02:56, Christopher Stone a écrit :
> Hey Folks,
>
> I can scriptomatically acquire a reference to a message in the form shown below and use it later in the script, BUT if I simply paste the reference into a script it won't compile.
>
> tell application "Mail"
> message id 392140 of mailbox "INBOX" of account "test" of application "Mail"
> end tell
>
> WTH?
>
> Shouldn't I be able to reference it directly and do something like:
>
> tell application "Mail"
> tell message id 392140 of mailbox "INBOX" of account "test" of application "Mail"
> get its source
> end tell
> end tell
Hello Chris,
Unless I'm wrong, Mail never has implemented ID reference forms.
(this is why I allowed myself to change your message's subject. ;-) )
Why, I don't know for sure; probably because the way message IDs are internally built by Mail doesn't allow to promote them to real IDs, in a programmatic sense?
For example, moving a message from one mailbox to another seems to increment its ID; as a result, moving that message back to its original mailbox would have invalidated any former reference by ID.
The real question thus seems to be: why does Mail expose what seems to be an implementation detail through a message property?
Sincerely,
Axel
_______________________________________________
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