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 ...

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to