CFTypeRef focusedWindow;
AXUIElementCopyAttributeValue(
frontMostApp, kAXFocusedWindowAttribute, (CFTypeRef *)&focusedWindow
);
in this case, How do I get window number from focusedWindow
?
Window number is l开发者_如何学运维ike [[NSApp mainWindow] windowNumber]
It's an AXUIElement, and unfortunately, you can't get its window number AFAIK.
精彩评论