Split OCR result Text or retrieve coordinates

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ronin
Newbie
Posts: 3
Joined: Thu Sep 27, 2012 9:46 am

Split OCR result Text or retrieve coordinates

Post by ronin » Sat May 30, 2020 3:15 pm

Hi MJTNet team, first of all congrats on the great product, I used v13 on the job a few years ago and then moved on to different tasks , now I see v15 and again think: good stuff!

now to my question: I have been trying the OCR functionality ( all 4 functions using tesseract) and the work, however there is one/two thing that bug me , I would like to split the text line-wise , and i havent found a way to do this or anything in help or forums regarding this , maybe i serached for the wrong things. Furthermore on top of this some bounding box coordinates would be helpful and If I'm not wrong tesseract itself returns such coordinates in the hOCR file , any way to get them into MacroScheduler, or where would i find this file please?´
Also the Spaces between lines are off if there is a 'dot' then defining it as delimiter would work, there are also those without.
Thanks in advance.

Cheers,
E
“Do nothing that is of no useâ€

User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: Split OCR result Text or retrieve coordinates

Post by PepsiHog » Wed Jul 15, 2020 7:54 pm

@ronin,
Really would like to help. But I'm one of those that needs pictures. Books without pictures bore me. So, show me an example of what you want, and I will try to help.

Post a script, what you have already, or just make up an example script for the portion you would like help with.

I have said it before multiple times and I'll say it again. No example, more times than not, gets you ignored. I can help, but I don't wanna work that hard.

Help us, help you,
PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Split OCR result Text or retrieve coordinates

Post by Marcus Tettmar » Thu Jul 16, 2020 2:06 pm

To "split the text line-wise" I assume you mean you want to split on a line feed into multiple strings. That's what the Separate command does. Split on CRLF to create an array:

Separate>theText,CRLF,lines

See:
https://www.mjtnet.com/manuals/v15/HTML/separate.html
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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