Re: Getting a selection's data via Entourage's applescript by Brett
Brett
Wed Aug 04 22:56:49 CDT 2004
Thanks, Bo.
That was extremely helpful.
I guess I didn't think that the selection could be more than one item (since
in the case I was trying it wasn't), so I hadn't thought that I'd need to
specify "item 1 of...".
Thanks again,
Brett
On 8/4/04 10:17 AM, in article BD36CAAA.3AD6%bo.boivie._DELETE_@bigfoot.com,
"BB" <bo.boivie._DELETE_@bigfoot.com> wrote:
> On 04-08-04 08.01, in article BD35E5F6.177A%b.zamir@comcast.net, "Brett
> Zamir" <b.zamir@comcast.net> wrote:
>
>> Does anyone know where I can find out how to get the properties or whatever
>> of a "selection" in Applescript? I can't seem to convert "selection" to a
>> string and I don't know how to get at its contents ("contents of selection"
>> nor "properties of selection" seemed to work either). I'd really like this
>> feature to be able to open an instant message in iChat, etc. to the address
>> highlighted, etc..
>>
>> Thanks again,
>> Brett
>>
>
> If you have selected text in the body of a message it should work like this
>
> tell application "Microsoft Entourage"
>
> get selection as string
>
> end tell
>
> If you have selected something else, like the from address in the preview
> pane, the selection will be a list with one item which is the message
> itself. ({incoming message id 14995 of application "Microsoft Entourage"})
>
> You must then get the first item of the list and work on the different
> properties of the message class.
>
> Use the "Open Dictionary" function in AppleScript editor to look at the
> different classes and commands supported by Entourage.
>
> -Bo
>