Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Waitfortext1 -- How on earth does the RegularExpression option work?

Status
Not open for further replies.

Daneyuleb

Technical User
Jul 27, 2022
1
US
Hi!

I hope some expert out there can point me in the right direction.

I'm using Reflections 14, and need to do a check on the appearance on text that could start at column 1 OR column 2 (no way to find out which until it appears).

The method: WaitForText1 would work, but... it requires the specific location however--and will time out if I "miss" the right column for a given check for the text.

There is, however, an intriguing but(as far as I can tell) never documented "textComparisonOption_RegularExpression" option to the WaitForText1 method. I'm hoping that once I know how it works, I can handle the situation, by regexp'ing the actual text from the specified area starting at column 1.

Does anyone know how that option works? The Attachmate help page only has a partial description that ends abruptly:
"RegularExpression Compares text using a regular expression.
where expression is a variable that represents an"


That's it. And there's not an example to be found anywhere.

Thanks for any light anyone can shed!!!

-Daniel
 
Hi,
Thank you for reaching out. We regret to hear that you are having some trouble with using the product. We would be more than happy to help you troubleshoot and get you up and running.
 
Hi,

WaitFor... is probably one of the most misunderstood functions.

1) Read this FAQ carefully to gain a better understanding of HOW to use WaitFor... functions. Make sure you read the quote from the mother site at the bottom.
FAQ99-7887

2) Here's the documentation for WaitForText1.

3) With the uncertainty of which column the text will appear in, just use an Or in your loop...
Code:
Do Until oScreen.WaitForText1(, text, row, col1) Or oScreen.WaitForText1(, text, row, col2)
    DoEvents 
Loop

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top