selecting the selected
Peter Brigham MD
pmbrig at gmail.com
Wed Feb 16 10:20:14 EST 2011
On Feb 16, 2011, at 10:10 AM, Richmond wrote:
> Umm . ..
>
> so I have a field [called fld "TEKST"]full of text and I select some
> of it with my mouse
>
> I then click on a button that contains the following script:
>
> on mouseUp
> copy the selected of fld "TEKST"
> end mouseUp
>
> nix!
>
> now, I've tried "the selectedText" and "the selectedChunk" to no
> avail . . .
>
> Please advise
First, the traversalon of the button must be false or the selection in
the field will be wiped out by the mouseclick before it can to used.
With this in place, if you just use:
on mouseUp
copy
end mouseUp
if should work. An alternative is to put this in the button script:
on mouseenter
set the selText of me to the selectedtext
end if
on mouseup
put the selText of me into sText
set the clipboarddata{"text"] to sText
end if
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list