View Single Post
  #3  
Old 03-06-2018, 03:15 PM
bgagnon bgagnon is online now
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,026
Hi bighalo,

As far as solving the problem of unexpected results ...

You've only provided a snippet of code and so I really do not have context for the issue, but isn't it conceivable nIndex might ever not be equal to 1?

If that's the case, exit sub is not going to get called (at least in that loop).

You might temporarily add MsgBox statements in the code at strategic points to try to verify the data:

Code:
sub main()
MsgBox "Entering Main()"
...

do
  nIndex = objTab.Screen.WaitForStrings(g_vWaitFors)
  MsgBox "nIndex: " & nIndex
  if nIndex = 1 then
    ...
    <do something>
    MsgBox "About to exit Main() subroutine"
    exit sub
  end if
loop

end sub
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote