标签: objective-c cocoa macos
CFTypeRef focusedWindow; AXUIElementCopyAttributeValue( frontMostApp, kAXFocusedWindowAttribute, (CFTypeRef *)&focusedWindow );
在这种情况下,如何从focusedWindow获取窗口编号?
focusedWindow
窗口编号类似于[[NSApp mainWindow] windowNumber]
[[NSApp mainWindow] windowNumber]
答案 0 :(得分:1)
这是一个AXUIElement,不幸的是,you can't get its window number AFAIK。