Page 1 of 1
Flushing down the pan
Posted: Sun Aug 31, 2025 1:16 pm
by richmond62
I have a stack where all sorts of messages are being sent, and I wish to top everything 'dead', so I decided to use flushEvents,
now, naturally I should send flushEvents("keyUp") as it is inwith a keyUp statement I need to stop everything dead, BUT . . .
. . . I need to send 2 further commands inwith the keyUp command after the events have been flushed.
Re: Flushing down the pan
Posted: Sun Aug 31, 2025 2:34 pm
by richmond62
Re: Flushing down the pan
Posted: Mon Sep 01, 2025 8:07 am
by scott_morrow
I see that you are using "send". If you are using "send in time" anywhere then you might want to cancel "pendingMessages" as well.
Re: Flushing down the pan
Posted: Mon Sep 01, 2025 9:35 am
by stam
richmond62 wrote: ↑Sun Aug 31, 2025 1:16 pm
I have a stack where all sorts of messages are being sent, and I wish to top everything 'dead', so I decided to use
flushEvents,
now, naturally I should send
flushEvents("keyUp") as it is inwith a
keyUp statement I need to stop everything dead, BUT . . .
. . . I need to send 2 further commands inwith the
keyUp command after the events have been flushed.
You may find these handlers helpful:
# stop a specific pending pMessage
Code: Select all
on stopPendingMessage pMessage
repeat for each line tLine in the pendingMessages
if pMessage is in item 1 of tLine then
cancel item 1 of tLine
end if
end repeat
end stopPendingMessage
# stop all pending messages
Code: Select all
on stopAllPendingMessages
repeat for each line tLine in the pendingmessages
cancel item 1 of tLine
end repeat
end stopAllPendingMessages
Attribution:
viewtopic.php?t=20389#p103568