objective c - Is there a way to programmatically give focus to another running application in OSX? -


i have use case i'd app give focus specific running application. how do that?

if know application's bundle id (and need target 10.6+), can do:

nsrunningapplicatin *app = [nsrunningapplication runningapplicationwithbundleidentifier:@"com.foo.someapp"]; [app activatewithoptions:nsapplicationactivateallwindows]; 

Comments

Popular posts from this blog

php - How to build a web site which gives a sub-domain dynamically to every registered user? -

c# - Add item to Generic List / Collection using reflection -