How can I get window's title, position and size if it does not support Accessibility API? Accessibility Inspector does not see it at all. Say, it's a xterm window in X11.app (X11->Applications->Terminal).
views:
58answers:
3
A:
In general you can't. However, for X11 windows specifically you can use XGetWindowAttributes to get this information just like you would on Linux or any other UNIX.
n8gray
2010-06-14 18:43:04
+1
A:
You should be able to get all of this window information through the methods exposed in the CGWindow.h header file. Apple's docs are online on the Quartz Window Services Reference page. They also have a very informative sample app called Son of Grab which should get you started.
Scott Giese
2010-06-15 03:07:48
A:
You can use CGWindowListCreateDescriptionFromArray(). See CGWindow.h
This gives you an array of dictionaries. The following information will probably be useful to you:
- position and size: kCGWindowBounds
- name: kCGWindowName
Leibowitzn
2010-06-15 18:22:19