Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Need #6

Open
Anewri32 opened this issue Feb 17, 2022 · 4 comments
Open

Documentation Need #6

Anewri32 opened this issue Feb 17, 2022 · 4 comments

Comments

@Anewri32
Copy link

The winRT backend does not have enough information to be able to use it correctly, and the understanding of the catch in general is complex, there is nowhere to start to document it.

@wolfmanstout
Copy link
Owner

I'd like to help but I need a little more detail. You generally should not need to interact directly with the WinRT backend -- it is constructed and managed by the Reader object. For example, if you follow the WinRT installation instructions, then this code sample should invoke it behind the scenes:
https://github.com/wolfmanstout/screen-ocr/blob/master/screen_ocr/__main__.py

I'm not sure what you mean by "the understanding of the catch in general is complex". What's the catch?

@bernd-wechner
Copy link

I landed here because of., well a Documentation Desire ;-). Specifically, this looks like it rocks, making it "it easy to perform OCR on portions of the screen.". Yet the example is for the whole screen. I'm doing some UI automation with pywinauto for example and have a UIA control, from which I can get a screen rectangle, and all I'd want up front is a clear example delivering on the promise: how to get an OCR a portion of the screen, perhaps defined by a rectangle.

This could work in awesome concert with pywinauto, for apps (like the one I'm working with) in which the UI framework renders a good many label texts graphically or at very least does not expose UIA elements that contain the text.

@wolfmanstout
Copy link
Owner

That's a very reasonable request @bernd-wechner! I'll improve the API so this is easier and document it.

@wolfmanstout
Copy link
Owner

Hi @bernd-wechner, please take a look at the updated __main__.py with simple code for doing this. Please make sure you are using the latest version, which I just released (0.4.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants