I've seen a similar thing. I set the focus to a field, then "select after field
xxx". Sometimes it does what you expect, sometimes it selects the text of the
whole field. Send in time is the only way around these timing issues.
Bob S
> On Apr 23, 2017, at 01:10 , Mark Schonewille via
HYi Kaveh,
LiveCode sets the focus to the clicked object after running the scripts.
If I would select text the normal way, the selection would be deselected
again, because the focus would go away from the field to the button
containing the script. Using the send in time command, I make sure
Wonderful :-)
Can you give me a hint of this line please:
send "select word" && myChunk && "of fld 1" to me in 0 millisecs
Why not just
select word" && myChunk && "of fld 1"
On 22 April 2017 at 12:33, Mark Schonewille via use-livecode <
use-livecode@lists.runrev.com> wrote:
> This tells you
This tells you the number of the selected word:
on mouseUp
put the selectedChunk into myChunk
put word 4 of myChunk into myChunk
put the number of words of char 1 to myChunk of fld 1
send "select word" && myChunk && "of fld 1" to me in 0 millisecs
end mouseUp
Kind regards,
Mark
I have selected some text in a field. I want to convert that to "word xxx
of fld yyy". Any hints on how I do that?
--
Kaveh Bazargan
Director
River Valley Technologies
@kaveh1000
+44 7771 824 111
www.rivervalleytechnologies.com
___
use-livecode mailing