Finding text within any window

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Finding text within any window

Post by NancyM » Wed Aug 31, 2016 7:06 pm

Using the Open Windows tool I can search for a specific piece of text inside a window. Is it possible to replicate that inside a MS script? Let's say I want to see if that bit of text is anywhere on the screen. How would I search through all open windows to find it? I'd like to find "This loan is locked", or not find it.

The next step would be to actually capture that whole text piece if possible, but just knowing it is there is valuable.

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Finding text within any window

Post by JRL » Wed Aug 31, 2016 8:05 pm

Does the text show up anywhere in the result if you run the code posted HERE? If yes then I can probably write a sample script to get the data you need.

NancyM
Pro Scripter
Posts: 66
Joined: Mon Jul 18, 2016 7:01 pm

Re: Finding text within any window

Post by NancyM » Wed Aug 31, 2016 8:07 pm

Of course, just after I posted that question I found the FindWindowWithText SRT. I'll try out your script though!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts