tyingst
14 years agoNew Contributor
WaitChild method, syntax and how does it work?
I have an application that pops up a dialog with an unpredictable number of lines of text.
The application expects the user to read each line of text -- and does so by making sure the user hits the down-arrow for every text entry.
When the lines of text are exhausted, a button is displayed at the bottom of the dialog -- the user needs to select that button to continue.
My plan was to use code like:
while not Aliases.TMDS.frmSingleFormAuthorityCP.gbTNT.btnRepeatTNT.WaitChild("btnRepeatTNT", 1000).Exists
Call Aliases.TMDS.FrmSingleFormAuthorityCP.gbTNT.Keys("[Down]")
wend
Call Aliases.TMDS.frmSingleFormAuthorityCP.gbTNT.btnRepeatTNT.ClickButton
However, when executing the script, the button pops up, but I never exit the while/wend loop -- it just keeps on down-arrowing ad-infinitum.
The "btnRepeatTNT" object is a child of the .gbTNT. object.
What am I doing wrong?
The application expects the user to read each line of text -- and does so by making sure the user hits the down-arrow for every text entry.
When the lines of text are exhausted, a button is displayed at the bottom of the dialog -- the user needs to select that button to continue.
My plan was to use code like:
while not Aliases.TMDS.frmSingleFormAuthorityCP.gbTNT.btnRepeatTNT.WaitChild("btnRepeatTNT", 1000).Exists
Call Aliases.TMDS.FrmSingleFormAuthorityCP.gbTNT.Keys("[Down]")
wend
Call Aliases.TMDS.frmSingleFormAuthorityCP.gbTNT.btnRepeatTNT.ClickButton
However, when executing the script, the button pops up, but I never exit the while/wend loop -- it just keeps on down-arrowing ad-infinitum.
The "btnRepeatTNT" object is a child of the .gbTNT. object.
What am I doing wrong?