Skip navigation.
 
mlRe: Traversing windows with Cocoa
FROM : Jens Alfke
DATE : Mon Mar 03 23:16:44 2008

On 3 Mar '08, at 1:10 PM, aldo kurnia wrote:

> Given a window's TITLE, how do you create a reference to it, 
> determine what kind of application the window is (the name of the 
> application/executable)? and how do you move that window to the front?


Applications run in protected memory spaces. There's no way to get 
direct access to windows of other processes. (This is a Good Thing for 
system security.)

> Applescript is also not very useful since the application I'm trying 
> to support doesn't support some of the basic window scripts.


The UI scripting support might help; its AppleScript commands end up 
generating fake UI events in the target app, so you can manipulate 
even apps that aren't scriptable. I don't know how to use that stuff, 
though. Check the docs.

—Jens

Related mailsAuthorDate
mlTraversing windows with Cocoa aldo kurnia Mar 3, 22:10
mlRe: Traversing windows with Cocoa I. Savant Mar 3, 22:13
mlRe: Traversing windows with Cocoa Jens Alfke Mar 3, 23:16
mlRe: Traversing windows with Cocoa Eric Schlegel Mar 3, 23:31
mlRe: Traversing windows with Cocoa aldo kurnia Mar 3, 23:45
mlRe: Traversing windows with Cocoa Bill Cheeseman Mar 4, 12:31
mlRe: Traversing windows with Cocoa Bill Cheeseman Mar 4, 12:33
mlRe: Traversing windows with Cocoa Stephan Burlot Mar 4, 18:45
mlRe: Traversing windows with Cocoa aldo kurnia Mar 5, 01:02