LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I have set up a counter and I want to be able to to click on a button and get the count whilst it is still running. at the moment I have to stop the counter. Is there a way I can set the counter to run in the background so that I can still complete other tasks while it is running?
put "" into tQty
put "" into gN
put fld "QTY" - 1 into tqty
if gCompleted <> "" then
put gCompleted + 1 into tcounter
else
put 1 into tcounter
end if
set the ustopped of me to false
--put tqty - gCompleted
repeat tqty - gCompleted times
put "" into gCompleted
add 1 to tcounter
wait 0.25 seconds
put tcounter into N
send "tmUpdateGauge N" to group g6
put (N / tqty)*100 into gN
send "tmUpdateGauge gN" to group g2
wait 10 milliseconds with messages
if the uStopped of me is true then
put N into gCompleted
exit repeat
end if
end repeat
I tried putting that code into my script and I get an error. Doesn't want to accept it for some reason. Also using gCompleted variable will only work if the counter is stopped. I use that variable to mark the point where I want the counter to restart again. I want to be able to click on a button and take the count as it is at that instant. That number would be in tCounter. I want to do it again a little later so that I am marking the beginning and end of an event. I want to store both numbers in a table and put the difference between them into another column. In the real world the count would be supplied by a machine and the tags represent "bad work" or waste. I want the operators to able to mark this bad work on the fly.
kind regards Glenn