Hi Ben,

Take a look at the new Leopard only CGWindowListCopyWindowInfo method. Its probably what you are looking for and is able to provide a list of windows in z-order, including rect position (screen relative of course), pid, title etc. You cant modify windows using this API, but you'll be able to query them at least.

Enjoy.

--
John Clayton
http://www.coderage-software.com/


On May 13, 2008, at 8:13 AM, Ben Lowndes wrote:

On Tue, May 13, 2008 at 4:01 PM, Jens Alfke <[EMAIL PROTECTED]> 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.


Nothing personal, but people seem to ask this question here about once a week ... and I just have to ask "why"? What kind of application are you working on? I can't think of a compelling usage for this, other than writing
some kind of window-management utility (or malware...)

Yes, exactly: I'm working on a window management utility (or I'm trying to...).

And BTW, if you search the list archives you'll find easily 100 messages on
this exact topic just in the past two or three months.

Being new to Cocoa, at first it's difficult to phrase the question
correctly when searching for the answer; so for the benefit of future
searchers the solution seems to lie in using the accessability API or
an input manager. Is that correct?

Thanks,
Ben
_______________________________________________

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/john_clayton %40mac.com

This email sent to [EMAIL PROTECTED]





_______________________________________________

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