Hi Benedikt,

this is Interapplication Communication, so it seems it's time for you to get into AppleEvents:-)

Send an AppleEvent to the other app to set the window's index to 1 (indexes in AppleEvents are 1-based!).

Cheers,
Peter

p.s.: Schöne Grüße aus München


Am 27.02.2011 um 13:55 schrieb Benedikt Iltisberger:

Hello everybody,

I read tons of information on how to set and get the PID but i need a way to set a window to front (and not a window of a PID). The problem is that if I set a PID to front, it might not be the exact window i want because the process can have multiple windows.

With help of the CGWindowListCopyWindowInfo I can get all window IDs and filter out the needed one.

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.)

It would be very glad if somebody has a advise for me.

Thanks in advance.

Cheers
Benedikt

_______________________________________________

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