<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: Selecting a word</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>If you want to click on a locked field and put a
rectangle around it, you can use this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>on mouseUp<BR> set the textStyle of the
clickText to box<BR>end mouseUp</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>You'll have to clear the box style for each
successive click, but you get the idea...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Ken Ray<BR>Sons of Thunder Software<BR>Email: <A
href="mailto:kray@sonsothunder.com">kray@sonsothunder.com</A><BR>Website: <A
href="http://www.sonsothunder.com/">http://www.sonsothunder.com/</A></FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=stuart_milliken@sil.org href="mailto:stuart_milliken@sil.org">Stuart
Milliken</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=use-revolution@lists.runrev.com
href="mailto:use-revolution@lists.runrev.com">use-revolution@lists.runrev.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, December 21, 2001 12:15
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Selecting a word</DIV>
<DIV><BR></DIV><FONT size=1><FONT face=Mishawaka>>I am having a problem
finding a command to select a word<BR>>and put it into a
container...<BR>>I'd like to click on a word, show a rectangle around it
(like in <BR>>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. (For an unlocked field I
assume you don't want to interfere with single-clicking.)<BR><BR>on
selectionChanged<BR> put the ticks into t<BR> repeat
until the mouseClick<BR> if the ticks - t >
the doubleClickInterval then exit to top --SEE NOTE BELOW<BR> end
repeat<BR> if the clickChunk = "" then exit to
top<BR> select the clickChunk --OPTIONAL, TO HILITE THE
WORD<BR> put the clickText into someContainer<BR>end
selectionChanged<BR><BR>(NOTE: "the doubleClickInterval" gives me a number
apparently in milliseconds, though the documentation says it should be in
ticks on a Mac. 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> select the clickChunk --OPTIONAL, TO
HILITE THE WORD<BR> 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></BLOCKQUOTE></FONT></FONT></BODY></HTML>