nother newbie question this time re foundChunk

Timothy Miller gandalf at doctorTimothyMiller.com
Wed Mar 23 14:21:31 EDT 2011


Tricky! I never would have thought of that.

Thanks a bunch.

Tim


On Mar 23, 2011, at 2:51 AM, Mike Bonner wrote:

> If you know the number of words in the field:
>     put the number of words in field "narrative" into tWords
> 
> and you know the location of the found word:
>     put the number of words in (char 1 to (word 4 of tfound)) in field
> "narrative" into tFoundWord
> -- didn't try it, check syntax
> 
> then you should be able to grab the number of words you want directly. Will
> still need to make sure the word location isn't too close to the beginning
> or end of the text, but if you wanted 5 words on either side of the found
> word you could do:
>     put word (tFoundWord - 5) to (tFoundWord + 5) of field "narrative" &
> the short ID of this card & cr &cr after tFoundList
> 





More information about the use-livecode mailing list