In the following code the subroutine "pexit" is never called, even though the "quit DISPATCH" string shows up on the display. I'm using VT100. Essentially what I am trying to do is to have the sendvkey string sent (which is recognized as a "go back one screen" in the application) until the "home" screen (containing "quit DISPATCH") appears. Is there a better way to do this? Why is the target screen not recognized by this script?
Code:
proc main
when target 0 "quit DISPATCH" call pexit
while 1
sendvkey 0x78
endwhile
endproc
proc pexit
usermsg "Target Found"
exit
endproc