Getting a selection's data via Entourage's applescript

B

Brett Zamir

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
 
B

BB

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
 
B

Brett Zamir

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
 
Top