Re: WindowID to front
Re: WindowID to front
- Subject: Re: WindowID to front
- From: Peter Lübke <email@hidden>
- Date: Mon, 28 Feb 2011 13:34:30 +0100
Uli,
I apologize for my silly comment.
Of course you are absolutely right.
I totally overlooked you were refering to a User Session window ID,
which is totally different from an application specific window ID.
Cheers,
Peter
Am 28.02.2011 um 11:19 schrieb Peter Lübke:
There's no problem accessing a window by its (application
specific!) ID by AppleEvents / AppleScript.
(Must have been decades since you last opened Script Editor,
Uli :-) ).
Of course this depends on the application supporting AppleEvents...
Just run this script in Script Editor:
tell application "<otherApplication>"
properties of every window
end tell
Look at the result to see whether there´s an ID property.
Since I guess Benedict is working in the sphere of Accessibility
anyway, it might indeed be more appropriate to just call AXRaise on
the AXWindow element.
The reason I proposed AppleEvents was because he was asking for
adressing the window by its ID.
Am 28.02.2011 um 10:33 schrieb Uli Kusterer:
On 27.02.2011, at 13:55, Benedikt Iltisberger wrote:
But how can I now set the selected window ID to front?
(Note: It is a window of a foreign application which I want to
set to front. My own app wouldn't be a problem.)
Not sure you can use that information for anything (I don't think
AppleScript deals in Window IDs, but that may have changed since I
last had to put up with it). You may have more luck using the
accessibility APIs to both list the windows and then bringing one
to front.
Cheers,
-- Uli Kusterer
_______________________________________________
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