Find position of ocr text

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
bjorn82dk
Newbie
Posts: 13
Joined: Sat Jun 23, 2012 10:41 am
Location: Copgenhagen, Denmark

Find position of ocr text

Post by bjorn82dk » Sat Apr 22, 2023 1:17 pm

Hi all,
I'm building a macro where I need to locate a specific text and click on is. My issue is that the text is inside a mobile app and I'm "looking" at the screen through a Airdroid (similar to a Teamviwer session) so find text options are not available.

I have tried the OCR function inside MS and this is able to read all the text properly so my only issue is how to get it to return the position of a specific text - anyone who knows if this is possible?

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Find position of ocr text

Post by Dorian (MJT support) » Sat Apr 22, 2023 3:29 pm

The OCR functions will only return the text, and not the position it was found.

Maybe a combination of OCR to get the text, and Image Recognition to get the position? Of course that relies on you looking for the same text each time.

If it's in the same place within the window each time, then maybe getting the window position as a starting point?

Or image recognition to find a known constant anchor point and working it out from there?

Scanning pixels in a known area for a target colour?

I admit, none of these methods sound ideal, but may work depending on your application and am sorry this answer is not as helpful as I'd imagine you were hoping for.
Yes, we have a Custom Scripting Service. Message me or go here

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