Re: Traversing windows with Cocoa
Re: Traversing windows with Cocoa
- Subject: Re: Traversing windows with Cocoa
- From: Eric Schlegel <email@hidden>
- Date: Mon, 3 Mar 2008 14:31:14 -0800
On Mar 3, 2008, at 1:10 PM, aldo kurnia wrote:
So, I looked at Accessiblity API and NSApplication looks somewhat
promising because it can give out its NSWindow children reference
and there are functions to activate them. One missing piece of the
puzzle though, is that I couldn't find any way to get a list of
system-wide processes and create a NSApplication reference to them.
Does anyone has any idea about this?
There isn't any way to create NSApplication instances for processes
other than your own.
The Accessibility API (_not_ AppleScript) is clearly the right way to
go here. With Accessibility you can get information about the windows
in other processes, including their titles, and then compare those
titles to your desired window title. AppleScript is not sufficient for
this task because not all applications implement the AppleScript
scripting interface that you'd need to get this info.
-eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden