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

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -