I have this stopwatch that I want to start when a page opens, here’s how the code looks:
What did I do wrong?
I have this stopwatch that I want to start when a page opens, here’s how the code looks:
What did I do wrong?
maybe but try using set instead change
like -
initialize variable time to 0
when stopwatch fires {
set variable time to variable time + 1
from label2 set Text to variable time
}
First, I assume you set the time intervals in the design screen. Then in the block screen you need to use start / stop not enable.
This will make it run.
There is a known bug in the “when opens” component. Hope that thunkable will release a fix soon.
Hey @sp72979rdrlbc - does your timer have to start automatically like this? (for example, could you use a button to start the timer?)
I’d prefer it to but I think I can work around this problem by making it start when a button is clicked, thanks!