Re: Mail question
Re: Mail question
- Subject: Re: Mail question
- From: Andrew Oliver <email@hidden>
- Date: Mon, 24 Jan 2005 21:01:26 -0800
On 1/24/05 8:35 PM, "Rob Lewis" <email@hidden> wrote:
> I'm new at scripting Mail and I understand it's quirky, but this?
>
[snip]
> 4. But run this:
>
> tell application "Mail" to get (item 1 of the selection) --(with or
> without parens)
>
> returns an error message: "Mail got an error:
> NSCannotCreateScriptCommandError"
>
> The command to get item 1 of a list fails?!
It's a common problem when dealing with selections. I forget the exact
reasoning (Emmanuel can probably post a link). The upshot is that you need
to get selection independently of referencing items within it.
You should find that:
tell application "Mail" to get (item 1 of (get selection))
will work.
One of several gotchas.
Andrew
:)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden