iseahound / Vis2

Simple OCR using Tesseract
158 stars 33 forks source link

OCR([x, y, w, h]) relative to window? #6

Closed marcspc closed 5 years ago

marcspc commented 5 years ago

can I make OCR([x, y, w, h]) work relative to active window instead of screen?

iseahound commented 5 years ago

Yes. I believe it's OCR("A", "", [x,y,w,h]).

obuw commented 4 years ago

This doesn't seem to be working for me. I have a dual screen setup, and I'm failing to get OCR to work on any window in the second screen.

If I call OCR() and use the drag selection, it works fine. But if I try to call it using [x,y,w,h] parameters, it just reads from the first screen. To make regular ahk gui stuff work I can offset the x coordinates by 1920, but vis2 just throws an error if I try to do that.

I hope there is a simple solution to this problem? I'm sure there must be some kind of config setting for it, but the tesseract documentation is a nightmare to read through. Maybe I need to change the coordmode settings in the vis2 script?