FROM : Eric Schlegel
DATE : Mon Mar 03 23:31:14 2008
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
DATE : Mon Mar 03 23:31:14 2008
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
| Related mails | Author | Date |
|---|---|---|
| aldo kurnia | Mar 3, 22:10 | |
| I. Savant | Mar 3, 22:13 | |
| Jens Alfke | Mar 3, 23:16 | |
| Eric Schlegel | Mar 3, 23:31 | |
| aldo kurnia | Mar 3, 23:45 | |
| Bill Cheeseman | Mar 4, 12:31 | |
| Bill Cheeseman | Mar 4, 12:33 | |
| Stephan Burlot | Mar 4, 18:45 | |
| aldo kurnia | Mar 5, 01:02 |






Cocoa mail archive

