I thought of using a proc, but it's not really the best choice for something that is only used once right there in the code.
A universal proc wouldn't work either, because in the places I'm using this, the code is quite different.
I was thinking maybe a goto statement, but I'm looking into that.
Just posting this so I could get an idea of what you guys would do.
EDIT: Found a fix that gave me an outcome I liked.
The first way will cause an infinite loop until something is true, which in my case was the outcome I liked, and I think it could be replaced with a while loop that uses the sleep proc. The second one doesn't cause a loop, and can cause the wanted result, but not the way I wanted it to, strangely.
Do you think it's a justified use of the goto statement?