Ana
Ana

Reputation: 603

Mac OS X How to activate an external application that is already open?

I want to activate an external application. I don't want to launch my application, because the application is already open. I only want to change the window to display that application. Any ideas?

Upvotes: 0

Views: 963

Answers (1)

Macmade
Macmade

Reputation: 53950

You need to use the launchApplication method of NSWorkspace. If the application is already opened, it will simply activate it:

[ [ NSWorkspace sharedWorkspace ] launchApplication: @"TextEdit.app" ];

Upvotes: 1

Related Questions