Re: selected text
Re: selected text
- Subject: Re: selected text
- From: David Simerly <email@hidden>
- Date: Fri, 21 Sep 2001 11:06:43 -0700
- Url: http://www.digital-native.com
on 9/21/01 10:16 AM, "kannan balu" at <email@hidden> wrote:
>
Hi All,
>
>
I need to display a selected text in an application to the clipboard. How can
>
I do it? Help Please....
It really depends upon the application that you're trying to script. Not all
apps are scriptable, but assuming yours is, the script might look something
like this:
tell app "AppName"
set the clipboard to selection as text
end tell
The above script would put plain text on the clipboard. "set the clipboard
to" is part of the standard scripting additions suite. If you're talking to
an app that can send styled-text, then you can drop the "as text." You
should really look at your app's dictionary to find out what commands and
objects it implements. HTH.
DS
______________________________________
Digital Native
Your guide through the virtual jungle.
______________________________________
"Twenty years from now you will be more disappointed by the things you
didn't do than by the ones you did. So throw off the bowlines. Sail away
from the safe harbor. Catch the trade winds in your sails. Explore. Dream.
Discover." -- Mark Twain