Procedures won't wait for File.GotText to finish

New Bitmap Image

In this example, Button1.Click will display an empty message. How can I make the procedures that follow File2.ReadFrom to wait until File2.GotText finishes reading the text? Please help.

982a0f50182cbf8893ae3ac3a45880cf4f6f3486

Thanks ABG! But that limits Files.GotText to work with Button1.Click only. I want to use global_temp for some more procedures after the Notifier1.ShowAlert AND other buttons. Is there a way to make those procedures wait until File2.GotText finishes reading the text? (Sorry I wasn't clear)

Unless global_temp is meant to hold a temperature, it sounds like you are creating a Gordian Knot, a complicated structure that can't be untied.

What are the files for?
Are they meant to all be read at Screen startup (Initialize)?
What are the Buttons for?

Set a variable (the same one) for each button or procedure that you want to use, then test the value of the variable in File.GotText to elicit the correct response.

1 Like

New Bitmap Image
Button1.click will display "Name1", and Button2.click will display "Name2", and so on. Anyway, TIMAI2 suggestion is a little hard to follow when you debug, but it works. Thanks.

I get the feeling that this isn't over.

It's over. I take it as there isn't a way to "wait until .GotText finishes reading".

That is what the GotText event block does :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.