Text to speech and split text

hiii thanks very much it really helped a lot. But now I want it to show ingredients first but it doesnt contain "step" so it doesnt seperate. What can I do? Thanks!!

How are the ingredients stored?

i dont need to split the ingredients. I just want to split the ingredients and the recipe. Not the things listed in the ingredients list. Sorry. Thank you very much

Well, and how is stored the recipe and the ingredientes? Can you share the format of the recipes with ingrdients?

If there is a section under "Ingredients" tag/title you can try to split using that string.

For instance

Ingredients:

  1. eggs
  2. oil
  3. milk

Recipe:

  1. Crack the egg and mix well
  2. Add 5ml oil to the frying pan
  3. Fry the egg for 3 minutes

If you understand how split block works...you can divide the text as you want and keep the part you want.

For your other thread on showing a timer...

Use the Text contains 'minute' block to decide whether or not to show a timer.

im sorry but how can i make it time the number of minutes that is written before the word “minute”?

A stilted way...and very dependent on the format....the number goes before "minutes" and there are no other intermediate characters. From the position where "minutes" is found, you go back looking for numbers... until there are no more.

sorry it still doesnt work!! ive attached a few files below and can u please tell me what is wrong or missing!! u can also use that QR code to try my coding.



It looks like you are testing using iOS.

Is the scanner supported there yet?

yes it usually works but with this program it doesnt

Check this:
RecipeByCode.aia (3.3 KB)

For steps you can split the different steps (if all of them include the word Step it easier like we have seen in before examples)

for the minutes, I want to set it as a timer and when the user presses a button it starts. It also says that it is times up. How can I make that?

other than that, I would like to seperate those steps into the text on a button each page. like how you taught me before. How can I change back to that? I would like to use text-to-speech for reading out the recipe and ingredients

Use a Clock component. When a button clicked set the interval and enable the clock.
When Clock.Timer triggered, disable the clock and add whatever additional action you want.

The aia I shared you is only an example to show you how that blocks work. Adapt them to your app according to your needs or better, apply what you have learned to building your app.

ok but can you please tell me what is wrong with this code

Take you recipe and think in what part do you want in each label o in each Speech...think in how you need to split the text and what item of the generated list after split you want...for example, where are the ingredient? Taking your QR, if you split the recipe by "Recipe" in the first item you have the ingredients and, in the second item, the steps. where are you getting the ingredients?