A little help with the foundChunk
Mike Bonner
bonnmike at gmail.com
Sat Mar 10 20:59:07 EST 2012
Maybe something like this?
on mouseUp
put "card id" into tString
put "foo" into tField
put "word [[tFirstWord]] to [[tLastWord]] of [[word -2 to -1 of the
foundchunk]]" into tMergit
repeat until (findIt(tString,tField)) is "not found"
put word 2 of the foundChunk into tStart
put the number of words in char 1 to tStart of field 1 into tFirstWord
put tFirstWord + (the number of words in tString) into tLastWord
put merge(tMergit) & return after msg
end repeat
end mouseUp
function findit tString,tField
find tstring in field tField
return the result
end findit
On Sat, Mar 10, 2012 at 6:19 PM, Timothy Miller <
gandalf at doctortimothymiller.com> wrote:
> So I've got a list of foundChunks in the form --
>
> "char 10 to 16 of field 1 of card ID 1586"
>
> How do I convert them to the form --
>
> "word 3 to 4 of field 1 of card ID 1586"
>
> I want to do that, because I want to include the next word in each
> foundChunk by adding 1 to word 4 of each line.
>
> Alternately, is there a simple way to write the "find" command so I end up
> with a list of found words in the desired format, instead of a list of
> found chars?
>
> I don't need a working script, just a hint or two.
>
> Thanks again. Not so many amateurs and newbies here anymore, mostly pros.
> Hope not to be a pest.
>
> Tim
> _______________________________________________
> 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