Script control (was Re: [Squeakland] spiral)

Alan Kay alan.kay at squeakland.org
Tue Dec 14 06:17:57 PST 2004


Hi --

Having a script pause for a certain number of ticks is the same as having 
the script run for a certain number of ticks. If you use the looping 
mechanism I mentioned a few emails ago, you can see that a counting loop in 
etoys is the same as a counting clock or timer. Each tick is one clock 
time, and you can keep track of how many in a variable. You can test the 
variable and make another script start or stop ticking when the variable 
gets to a certain value.

Cheers,

Alan

---------

At 10:24 PM 12/13/2004, Shashank Date wrote:
>Alan Kay wrote:
>
>>At 04:18 PM 12/13/2004, Shashank Date wrote:
>>
>>>I keep forgetting about the execute once (!) option.  Is there any way
>>>to NOT have the clock icon on the script?
>>
>>
>>Why?
>
>Ummm ... only to emphasize that this script is limited to single 
>execution. Not a biggy, though, since you can
>always pause the clock.
>
>>>Alternatively, is there a more elegant solution to "stop script"
>>>regardless of which icons we click on (clock on the !)?
>>
>>
>>Why? (I don't understand your question here. Why would you want a clock 
>>on the (!)?
>
>
>Oops, a typo .. I meant to say clock OR the (!). Sorry for the confusion.
>
>>It will only run the script once and then stops by itself.
>>
>>You can stop any script with the "stop script" command in "scripting". 
>>You can stop any ticking script by hand by clicking on the clock that is 
>>visibly showing ticking. You can do the same in a viewer. You can 
>>stop/start all scripts that are ticking by using the  stop/go buttons 
>>(and these will also show you all the scripts in the environment, etc.).
>
>Yes, we have used all these mechanisms, at some point or the other. The 
>one thing we were looking for is to make a script pause for a specific 
>number of ticks ... but did not succeed. I think, some kids were able to 
>simulate that by introducing script variables.
>
>Any ideas?
>
>Thank you for being so patient.
>-- Shashank



More information about the Squeakland mailing list