How to use "send"

J. Landman Gay jacque at hyperactivesw.com
Tue Jun 10 14:36:00 EDT 2003


On 6/10/03 1:35 PM, Barry Levine wrote:

> I have a repeat loop I'd like to have execute one loop per second. 
> However, I can't use the "wait" command because there are objects moving 
> about on screen that I must not stop (and the "wait" command will stop 
> them). Here's the loop; perhaps someone can advise me how to change it 
> to the "send" structure?
> 
> repeat with i = 1 to 6
>     set the title of graphic "coverMask" to "Releasing piece " & i & "..."
> end repeat

I'd do something like this:

on setTitle n
   if n is empty then put 1 into n
   set the title of graphic "coverMask" to "Releasing piece " \
     & n & "..."
   add 1 to n
   if n < 7
   then send "setTitle n" to me in 1 second
end setTitle

To start it off, use either of these in the calling handler:

   setTitle 1
   setTitle

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list