How to use "send"
Dar Scott
dsc at swcp.com
Tue Jun 10 10:15:01 EDT 2003
On Tuesday, June 10, 2003, at 12: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
off the top of my head...
Method 1:
put "coverMask" into graphicName
repeat with i = 1 to 6
put "releasing piece " & i & "..." into newTitle
send "set the title of graphic graphicName to newTitle" to me in i
seconds
end repeat
Or this that don't work...
Method 2:
on updateTitle i
if i is empty then
put 1 into i
end if
set the title of graphic "coverMask" to "Releasing piece " & i &
"..."
if i < 6 then
send "updateTitle i-1" to me in 1 seconds
end if
end updateTitle
Then in your code put this
updateTitle
If there are problems, let me know; I didn't even bother to check this.
Dar Scott
More information about the use-livecode
mailing list