<HTML>
<HEAD>
<TITLE>Re: Selecting a word</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT SIZE="1"><FONT FACE="Mishawaka">&gt;I am having a problem finding a command to select a word<BR>
&gt;and put it into a container...<BR>
&gt;I'd like to click on a word, show a rectangle around it (like in <BR>
&gt;Hypercard) or color it, and put it into a variables container.<BR>
<BR>
<BR>
I'm not 100% sure if this is what you want, but the following works in a field's script for double-clicking on a word in an unlocked field to put the word in a container. &nbsp;(For an unlocked field I assume you don't want to interfere with single-clicking.)<BR>
<BR>
on selectionChanged<BR>
&nbsp;&nbsp;put the ticks into t<BR>
&nbsp;&nbsp;repeat until the mouseClick<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the ticks - t &gt; the doubleClickInterval then exit to top --SEE NOTE BELOW<BR>
&nbsp;&nbsp;end repeat<BR>
&nbsp;&nbsp;if the clickChunk = &quot;&quot; then exit to top<BR>
&nbsp;&nbsp;select the clickChunk --OPTIONAL, TO HILITE THE WORD<BR>
&nbsp;&nbsp;put the clickText into someContainer<BR>
end selectionChanged<BR>
<BR>
(NOTE: &quot;the doubleClickInterval&quot; gives me a number apparently in milliseconds, though the documentation says it should be in ticks on a Mac. &nbsp;Perhaps this is somehow due to my non-Mac (Logitech) mouse. If this is also the case for you, substitute literal value for a reasonable number of ticks, like 20.) <BR>
<BR>
If you have a mouse with a right button, the following also works to (right) single-click (for me anyway):<BR>
<BR>
on mouseUp<BR>
&nbsp;&nbsp;select the clickChunk --OPTIONAL, TO HILITE THE WORD<BR>
&nbsp;&nbsp;put the clickText into someContainer<BR>
end mouseUp<BR>
<BR>
This works without specifying a mouse button parameter because, for some reason, the mouseUp message evidently is only sent to the field if you right-click and not if you left click.<BR>
<BR>
If the field is locked and you just want to single-click in the normal way on the word, the above mouseUp handler works too.<BR>
<BR>
Hope this helps,<BR>
<BR>
Stuart Milliken<BR>
<BR>
</FONT></FONT>
</BODY>
</HTML>