copy from a locked, focusable fld under Windows

Jonathan Lynch jonathandlynch at
Fri Mar 10 18:16:42 EST 2006

This is how I would up doing it:

on RawKeyDown pKey
  if (pKey = 99 or pKey = 67) and the commandkey is down then
    if the selectedfield <> empty then
      put the selection into tSel
      put the htmltext of the selection into tSelHtml
      set the clipboarddata["text"] to tSel
      set the clipboarddata["html"] to tSelHtml
      select the selectedchunk
      exit rawkeydown
    end if
  end if
  pass rawkeydown
end rawkeydown

This is adapted from a the rawkeydown handler in taskmage, which does a
bunch of other stuff that does not need to be included here.

I find this script works well, and allows you to copy both formatted and
unformatted text so that it can be copied from a rev application and pasted
into any other application.

More information about the Use-livecode mailing list