how to poll priodically
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
how to poll priodically
In our application we connect to an external hardware via the usb port and from there to another device. We need to know that the hardware we connect to is in a certain state. We created an indicator and a button that checks this connection. It works fine thus far. Th problem is that e want the program to keep cheking on this connection every so often for as long as that particular stack is often. That is we don't want to kkeep pressing the button every 2 minutes to see ianything change. How do we do that?
Hi grodrig,
you could you a send in time construct. I ususally do it by moving the polling part of your button into a separate command
this should to it.
pertaining keywords in the dictionary: send, pendingMessages
regards
Bernd
you could you a send in time construct. I ususally do it by moving the polling part of your button into a separate command
Code: Select all
on mouseUp
send polltheDevice to me in 1 millisecond
end mouseUp
on polltheDevice
-- do your polling here
-- if everything is fine then
send polltheDevice to me in 120 seconds
-- else
-- do what is appropriate without sending
end if
end polltheDevice
pertaining keywords in the dictionary: send, pendingMessages
regards
Bernd