Open gerasimsergey opened 6 months ago
See https://github.com/tmandry/x3/issues/1#issuecomment-437231522. I'd accept a PR for a change that adds windowNumber as an optional property, because we cannot guarantee in a stable way that it will always be available. It would be fine to use the undocumented _AXUIElementGetWindow for this.
@tmandry Hello, thank you very much for your answer, I didn’t expect you to answer. I really like Swindler and I'm trying to use this library in a small project.
But some things are missing, or rather there is no way to extend them, because many properties and methods are internal let delegate: WindowDelegate If it were available then I could implement the methods I need...
If you use AXSwift then as I understand it there is AXUIElementRef almost everywhere why not just make them readable in the Window and Application classes?
Then everyone could make the necessary extensions
For example, CGWindowID from AXUIElement or implement raize for a window
A public API could be added that returned the AXUIElement for a given Window/Application. I actually thought I'd added one already. It would again have to be optional, to support testing use cases where there isn't a real UIElement to return.
I don’t quite understand, but if you implement this, I’m ready to actively test it on a real project
Any update for this?
kCGWindowNumber