pendingmessages

Dar Scott dsc at swcp.com
Wed Jun 18 11:08:00 EDT 2003


On Wednesday, June 18, 2003, at 09:37 AM, Martin Meili wrote:

> What does the following script do precisely?

Probably not what you want.
>
> on mouseup
> repeat with i = 1 to the number of items of the PendingMessages
> cancel (item i of the pendingMessages)
> end repeat
> end mouseup

I'll show you how to empty the pendingMessages, but you probably don't 
even want to do that.  In the Revolution development environment, 
beyond that, you don't want to remove Revolution messages.

The message ID is available in "the result" right after you send.  Save 
that away.  When you want to stop the timer, cancel that.

If you really want to cancel all (except Revolution messages), try this 
(off the top of my head):

repeat for each line msgLine in the pendingMessages
    if char 1 to 3 of item 3 of msgLine != "rev" then cancel item 1 of 
msgLine
end repeat

>
> Does this script empty the PendingMessages

no
> and can a command after this
> script be executed?

Yes.  Even if it did.
>
> I use this script to stop a timer (send command / updateclock). If the 
> time
> given is over the timer should be stopped and the user should be 
> brought
> back to the startscreen.

I keep hoping to get back to my "send primer" and make that available.  
RSN.

Dar Scott






More information about the use-livecode mailing list