Issue with Accessibility Visible Text Range

I am trying to draw NSPanels on texts of other apps using AXObserverAddNotification
with the attribute of kAXValueChangedNotification
on an AXTextArea
I need to detect if the text range on that text area is visible on the screen and I use kAXVisibleCharacterRangeAttribute
to get the visible text range but it doesn’t include the top bar of the app and gives a range that starts from an index that is not visible.
Thus the panels are drawn on the app’s top bar like this gif when I scroll to bottom
How do I deal with this?
Popular Macos topics

A Swift Kickstart is the perfect book for the experienced developer who wants to get serious about learning the Swift programming languag...
New

Anyone going to be upgrading anytime soon? :upside_down_face:
New

A statement from Apple regarding recent privacy concerns…
Privacy protections
macOS has been designed to keep users and their data safe...
New

https://twitter.com/patrickwardle/status/1349488392732491776
This thread was posted by one of our members via one of our news source t...
New

Combine is about to replace all those techniques for asynchronously passing information around in an iOS or macOS App: Target-Action, cal...
New

Just wasted hours trying to figure out why my Apple Magic keyboard 2 started lagging after the latest macOS upgrade - tried SMC and PRAM ...
New

This used to be easy - simply drag whatever files you want to onto a Time Machine disk. Now, macOS reserves the entire APFS disk for Time...
New

I’ve noticed that over the course of several updates my display (on both my MBP screen and my LG5K) has been looking more and more washed...
New

Just upgraded to macOS Monterey (12.1) and finding ‘live text’ quite annoying! If anyone else wants to turn it off here’s how:
System Pr...
New

Little Snitch Mini.
Privacy. Easier than ever.
New
Other popular topics

New
New

My first contact with Erlang was about 2 years ago when I used RabbitMQ, which is written in Erlang, for my job. This made me curious and...
New

Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New

Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New

A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New

If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: ...
New

Author Spotlight: VM Brasseur (@vmbrasseur)
We have a treat for you today! We turn the spotlight onto Open Source as we sit down with...
New

zig/http.zig at 7cf2cbb33ef34c1d211135f56d30fe23b6cacd42 · ziglang/zig.
General-purpose programming language and toolchain for maintaini...
New

Author Spotlight: Bruce Tate (@redrapids)
Programming languages always emerge out of need, and if that’s not always true, they’re def...
New
Latest in Macos
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm