Missing function selectedWords/selectedTrueWords

hh hh at hyperhh.de
Fri Aug 31 15:31:22 EDT 2018


You could try:

on mouseUp
  put the selectedChunk into sc
  put word 2 of sc into strt
  put word 4 of sc into stp
  put fld word 7 of sc into txt
  put selectedWords(strt,stp,txt) into fld "out"
end mouseUp

function selectedWords strt,stp,txt
  put the num of words in char 1 to strt of txt into w1
  put the num of words in char 1 to stp of txt into w2
  return w1,w2 -- start and stop
end selectedWords

Of course you have an uncertainty if your selection
starts or stops within words.

Similar for truewords ...




More information about the use-livecode mailing list