clickText? -chunk! :-)

Klaus Major klaus at major-k.de
Thu Aug 28 10:54:00 EDT 2003


Hi Nicolas,

> Hello,
>
> A request for help in finding a scripting solution to the following 
> problem.
>
> I want to be able to click on a word within a text field so that that 
> one
> word and not any other instances of it in a text-field becomes 
> identified.
> For example, given the sentence "To be or not to be", if I click on 
> the last
> "be" in the sentence I'd like it and only it to, say, become replaced 
> with a
> pair of underlines ("To be or not to _ _"). The only solution I could 
> think
> of was to combine mouseText and clickText with wordOffset. But, of 
> course,
> this didn't work, and instead resulted in the first "be" in the "To 
> be..."
> sentence rather than the clicked final-position "be" to be transformed 
> into
> dashes (i.e., "To _ _ or not to be").
>
> I'm guessing that the position within the sentence of the clicked-word 
> needs
> to be somehow retrieved (similar to "put word 2 of line 3"), but am 
> stumped
> about how to do this.

try "the clickchunk"...

This will return something like:

char 17 to 18 of fld 1  ## field number!!!

> Thank you.

You're welcome...

Hope that helps.

> Cheers,
>
> Nicolas Cueto

Regards

Klaus Major
klaus at major-k.de
www.major-k.de




More information about the metacard mailing list