WaitForString Mutiple Conditions

S

stickandrock

I have a macro that is opening an Attachmate Emulator session to access host
data.

I am having a delay issue with some customers because I am trying to capture
data(using getstring commands) from the the emulator before it has returned
it values.

I can test a message area on the screen and if it is greater than "" I can
assume the screen has returned. With the WaitForString command can I check
for > "" verses an exact match on a string. The message area may say
"Complete" or "Error Code - xxx", that is why I need a generic check.

Sample Code:

myscreen.SendKeys ("<CLEAR>")
myscreen.SendKeys ("/for OSINQ<ENTER>")
myscreen.SendKeys ("<Pf10>")
myscreen.SendKeys (SoldTo & "<ENTER>")
DlrNm = myscreen.getstring(6, 9, 36)

before DlrNm is assigned I need to put a wait in there. I have code to wait
a hard number of seconds, but each user experiences a different delay and I
want to make something that is a bit more dynamic.

Thanks,
 
J

joel

Have you tried setting the Wait parameter to true?

myscreen.SendKeys ("<CLEAR>", wait:=true)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top