On May 12, 2008, at 8:15 PM, Ben Lowndes wrote:

I'm a cocoa newbie, so I may be missing something obvious here: I'd
like to get a list of open windows for all currently running
applications.

I've been able to get the list of running applications from
NSworkspace, but can't see a method of getting the open windows.

Using appleScript I seem to be able to reference them all but I'm
wondering if there's a cocoa method?

This is a popular topic that has been discussed a lot here on this (and other) lists, so it would be a good idea to do some searching. In general, you can only directly reference windows in your own process. There are methods of getting some access to windows in other processes via the accessibility APIs, and someone here mentioned recently about a new Leopard-only method but I can't remember what it is off the top of my head.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to