• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: selected text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: CGI unable to process
  • Next by Date: copy excel cells to filemaker
  • Previous by thread: selected text
  • Next by thread: Re: applescript-users digest, Vol 2 #1092 - 6 msgs
  • Index(es):
    • Date
    • Thread