I have a B4XTable. The table has two columns, "String command" and "Delay". The string command contains what will be written to a label and the Delay on the same line is the countdown until it advances to the next row.
I have a "Play" button and a "Pause" button and a "Stop" button. When I hit play, it should put the string command from the first row into the label and start counting down the delay in the delay cell. Once it reaches 0, the next row is programmatically selected, the next string command is put into the label and the new delay starts counting down.
All this is fine, but I don't have a way to "Pause". Currently I have it working with just a for loop doing the countdown but I don't know of a way to pause it. If I use a thread is it possible to "Pause" the thread? and unpause to pick up where it left off? I'm not fully understanding threads and I know it has a start and stop and an interrupt, but no pause like in windows threads. Is there a better way than using threads? a way to actually manually "pause" a sub?