Fantastic, this is exactly what Im looking for. Time to dive into C!

Thanks!!

On Thu, May 21, 2009 at 10:24 PM, Eric Schlegel <eri...@apple.com> wrote:

>
> On May 21, 2009, at 12:59 AM, John Ku wrote:
>
>  What should I look into if I need to grab the document/window name from
>> other running applications? Currently I have the following to get a list
>> of
>> available running applications:
>> [[NSWorkspace sharedWorkspace] launchedApplication]
>>
>> How do I go about getting the document/window name from other
>> applications?
>>
>
> On Leopard and later, you may be able to do this with the CGWindow API
> (CGWindow.h). Something like this:
>
> - use CGWindowListCreate to get a list of all windows
> - for each window in the list, use CGWindowListCopyWindowInfo to get info
> about the window
> - from each window's info, get the kCGWindowOwnerPID entry so you can sort
> windows by pid
> - from each window's info, get the kCGWindowName entry so you can identify
> the window name
>
> -eric
>
>
_______________________________________________

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 arch...@mail-archive.com

Reply via email to