Upating a lable sequentially from a timer


Hi,
Firstly thank you for all the hard work you all contribute to the community,
I am very new to Apps Inventor, so my coding my not be perfect, however I've spent many days working with it, I should have reached out earlier, but I really wanted to solve it myself, but now 'm going round in circles.
I have a project where i need to update a label depending on which task is being run at the time.
Each task is run sequentially and initiated from a button.
The problem I have is the the label only display the status of the last task., but the project runs them all.
Can you guys help?

Thanks

Your use of a delay procedure is probably not working, therefore the label is being loaded but too quickly for you to see each one.

See Waiting and Timing in the FAQ

Hi TIMA12,
I' see you have a lot of knowledge with this product and are a main contributor, I have searched for Waiting and Timing but unable to find it, would you mind provifding a bit more help?

The delays are in seconds, minimum of 4 seconds, so I'd expect to see something

Hi, the attached blocks show two procedures, (one produces audio, the other is meant to update a label), each one has the same delay process, (5 seconds) applied to them, however the only one that works sequentially is the audio. The one with the label only updates the label with the last attempt.

I believe app inventor is a single process, and if given 3 tasks , e.g. A,B and C it needs to finish each one before going on to the next, so it will do A, then B and finally C is the correct?, if so why does it not update the labels?
I've read and looked at example, but still fail to get this to work.
Can anyone help me?

You should learn how to use the clock timer for a "delay"

FAQ Section: Waiting and Timing

Hi TIMA12,
Thanks for getting back, I've read the articles many times, and it looks like what I want can't be done, if so not a problem, just dont want to flog a dead horse

It can be done, you just have to use the clock timer correctly, and run each action through the timer.

really sorry to bug you but i thought that is what I was doing

Unfortunately not, because AI2 will just run your delays and immediately move on to the next command in the sequence (without creating a delay)

You need to

  1. Run your first command
  2. Start the timer
  3. In the timer event, stop the timer, then run your next command and start the timer again, stop the timer and run your next command, and so on.
  4. You may need to set a variable so that the timer knows which command to run on each iteration

Try something like this:
timer_delay.aia (10.0 KB)

Hi Anke,

Your solution works great on a phone Samsung A13 with Text to Speech thank you.
My app also works with text to speech on a phone. The reason I wanted to update a label is for people who are either hard of hearing, do not want speech or their device doesn't support speech, like the Amazon Fire 7 2003.
I'm new to Android and App inventor, but didn't realise that Amazon Fire 7 was a limited device.

I will see what I can do with your code so it just updates the labels without using text to speech, but I am not as quick as you guys and I've spent many ,many hours so far.

It's almost the same:

Hi Anke,
I don't wna to sound ungrateful, but the nw solution without the text to speech doesn't wotk. there is no text to the label at all.
I'm on my way out, so can look at in a few hours, the progress youve made us far better than I've had in weeks

Of course, it is. The result is the same as before (without TextToSpeech).

There is no text at all

grafik

Strange, I've removed the text to speech as per your image and when I press Start I get nothing in the text box

I think I've found the problem, I didn't add the set label in the timer block