Open tom2strobl opened 1 year ago
So I was able to narrow it down. I wrote a super quick script that rewrites the last stdout line to process.stdout.write(`${window.title} - ${window.owner.name}`)
This way I could navigate around see live updates to what active-win
is seeing. Unfortunately it seems that almost any action in Illustrator causes their window to have an empty title.
Here's the default view (you can see the correct title at the bottom of the adobe window):
But when you open any dropdown field like stroke or fonts it suddenly becomes empty:
Same when eg. just opening a toolbar:
Or even simpler – just a context menu:
Is there anything we can do about this or are our hands tied since Adobe doesn't return anything here?
😬
Ok, so after all it just simply seems that all those interactions technically launch sort of mini windows that obviously take the first space in the open-window-stack. Since they are launched from the "correct" window I can use activeWindow.getOpenWindows()
and if the first entry is one of those empty title shenanigans I can take the second entry and if the app name matches and has a window title, I can use that one. Sounds a bit flaky, so I will run some tests, but I guess its sort of a valid way to go about it.
Since it's not really an error on active-win
s end, but rather an inconvenience by adobe, feel free to close this issue.
So I've been using active-win for a year now and can navigate around tricky subjects like the permissions-business, so I'm not new to the library. Lately I've discovered something awkward that my non-swift brain cannot wrap its head around:
When using Adobe Products like Illustrator or InDesign and editing a document, more often than not the window title is returned empty:
Things I researched so far:
disableScreenRecordingPermission
in https://github.com/sindresorhus/active-win/blob/27221e5da0a64025bdec8759605694ea84ff9f68/Sources/ActiveWinCLI/main.swift#LL49C20-L49C52 since it reports other apps just fine (eg. Figma)kCGWindowName
is simply empty? Is there a simple way for me to confirm that?I'm investigating further and will report any findings in here.