script interruption
Yves COPPE
yvescoppe at skynet.be
Wed Nov 17 01:42:57 EST 2010
Le 16 nov. 2010 à 22:25, Ian McKnight a écrit :
> Hi Yves
>
> I did the following which I think gives you the behaviour you want:
>
> Create a stack with a scrolling field and a button.
> Lock the text of the field so that it can respond to mouse clicks.
>
> Put this in the script of the field (called Display)
>
> global gEndFlag
> on mouseup
> put true into gEndFlag
> end mouseup
>
> and put this in the script of the button
>
> global gEndFlag
>
> on mouseUp
> put false into gEndFlag
> randomText
> end mouseUp
>
> command randomText
> if gEndFlag is False
> then
>
> -- your line of text
> put any line of the weekdaynames into theText
> put theText&cr after fld "display"
>
>
> send randomText to me in 1 sec -- timing can be varied
>
> end if
> end randomText
>
>
> send in time effectively is your repeat
> and allows other processes to continue
> namely the ability to check when you have clicked in the field
> which I don't think the repeat loop will allow since it is still running
> when you click in the field.
Hi,
works perfectly
thanks !
Greetings.
Yves COPPE
yvescoppe at skynet.be
More information about the use-livecode
mailing list