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 that
this command is executed after LiveCode completes its routines, also
after LiveCode sets the focus.
If you use a different way to execute the script rather then from a
button or other object that is activated by a click, you won't need this
last line.
Moreover, sometimes I have this problem and sometimes not. I haven't
figured out why. At least, when it occurs, there is a way to solve it.
Kind regards,
Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch
Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com
Op 22-Apr-17 om 16:05 schreef Kaveh Bazargan:
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 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 Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch
Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com
Op 22-Apr-17 om 13:18 schreef Kaveh Bazargan via use-livecode:
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?
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode