That's what I thought WaitWindowOpen command did, but what's been happening instead is that if window was already open before command, it waits entire length of WW_TIMEOUT before closing it. I found a way around this with:
Code: Select all
IfWindowOpen>pageName
CloseWindow>pageName
ELSE
WaitWindowOpen>pageName
IfWindowOpen>pageName
CloseWindow>pageName
EndIf
EndIf
Also, this brings up a related issue:
Is there a way to keep the global WW_TIMEOUT value, but change it just for this window opening so it reverts back next time around? I thought I had stumbled across that the other day, but not seeing it now that I'm looking.
Again, I can come up with a solution, but again, it's kludgey:
Code: Select all
Let>defaultPageWait=60
Let>WW_TIMEOUT=defaultPageWait
SRT>closePage
Let>WW_TIMEOUT=%closePage_var_2%
IfWindowOpen>%closePage_var_1%
CloseWindow>%closePage_var_1%
ELSE
WaitWindowOpen>%closePage_var_1%
IfWindowOpen>%closePage_var_1%
CloseWindow>
EndIf
EndIf
Let>WW_TIMEOUT=defaultPageWait
END>closePage
GoSub>closePage,pageName,10