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

dictation: consider not grabbing the entire AXValue #8

Open
nriley opened this issue Mar 19, 2022 · 1 comment
Open

dictation: consider not grabbing the entire AXValue #8

nriley opened this issue Mar 19, 2022 · 1 comment
Assignees
Labels
dictation Related to dictation mode enhancement New feature or request

Comments

@nriley
Copy link
Collaborator

nriley commented Mar 19, 2022

At least in some cases you can explicitly request a range, e.g.:

>>> o.focused_element.children.find_one(AXRole='AXTextArea').AXStringForRange[Span(0, 10)]
'\n\nNicholas'

This may be more efficient with long documents.

@phillco
Copy link
Owner

phillco commented Mar 20, 2022

Nice, didn't know about AXStringForRange. Since we need DEFAULT_CONTEXT_CHARACTERS characters in both directions this should be a nice performance bump

@phillco phillco self-assigned this Mar 20, 2022
@phillco phillco added the dictation Related to dictation mode label Mar 20, 2022
@phillco phillco added the enhancement New feature or request label Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dictation Related to dictation mode enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants