Missing function selectedWords/selectedTrueWords

Tore Nilsen tore.nilsen at me.com
Fri Aug 31 15:40:01 EDT 2018


Beats "looping around» all the text any day! I think I can use this with my students in a couple of months time. For now, I think I have to stick to the more basic tasks of just altering fonts, text size, text color and text styles for single word selections.


Best Regards
Tore Nilsen







> 31. aug. 2018 kl. 21:31 skrev hh via use-livecode <use-livecode at lists.runrev.com>:
> 
> 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list