copy using the frontmost window

J. Landman Gay jacque at hyperactivesw.com
Fri Feb 9 01:02:00 EST 2007


sims wrote:

> My goal is to get the hilited text from a field onto the clipboard in 
> Windows.
> 
> With Applescript, the following does a 'command key C' or copy which 
> gets the
> hilited text of the frontmost window in OS X:
> 
>     tell application "System Events"
>         key code 8 using command down
>     end tell
> 
> It copies the hilited text from the frontmost window.
> 
> Is there a way to do this with Windows?

If you mean getting text from a Rev field, you can do it with native 
scripting on any platform:

  set the clipboardData to the selectedtext of fld 1

You can put other stuff in the clipboard too, if you use array notation:

  set the clipboardData["image"] to img 1
  set the clipboardData["RTF"] to the RTFText of field 1

See "clipboardData" in the docs. You can "get" the clipboardData too.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list