Forum Discussion
Colin_McCrae
11 years agoCommunity Hero
I'm a VBScript guy .... so I can't do it in code for you.
But I can do pseudo code.
Your example above wait until an object becomes available. But it has no timeout. So if the object never enables, you'll be stuck in that loop forever. (Eternal loop = BAD!)
So .....
------------------------------------------------------------------------------------
Reset Timer
Do
checkStatus = object.property-you-want-to-check
Loop Until (checkStatus = TRUE) or (timer > Allowed Time)
If (checkStatus = TRUE)
<do stuff with your object>
Else
<Log error saying the object timed out>
End If
------------------------------------------------------------------------------------
Something along those lines.
Make sense?
But I can do pseudo code.
Your example above wait until an object becomes available. But it has no timeout. So if the object never enables, you'll be stuck in that loop forever. (Eternal loop = BAD!)
So .....
------------------------------------------------------------------------------------
Reset Timer
Do
checkStatus = object.property-you-want-to-check
Loop Until (checkStatus = TRUE) or (timer > Allowed Time)
If (checkStatus = TRUE)
<do stuff with your object>
Else
<Log error saying the object timed out>
End If
------------------------------------------------------------------------------------
Something along those lines.
Make sense?