• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bring an application to the front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bring an application to the front


  • Subject: Re: Bring an application to the front
  • From: Nick Zitzmann <email@hidden>
  • Date: Fri, 23 May 2003 19:17:55 -0700

On Friday, May 23, 2003, at 02:46 PM, Daniel Aarno wrote:

How can I from within one application bring another to the front?

(Warning: Written in Mail, use at your own risk, etc.)

NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"tell application \"OtherApp\" to activate"];
NSDictionary *errorDict;

[script executeAndReturnError:&errorDict];
[script release];

That ought to do it. Do replace "OtherApp" with the app you want to bring forward, though.

Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://dreamless.home.attbi.com/

"Great spirits have always encountered violent opposition from mediocre minds." - Albert Einstein
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Is this logical?
  • Next by Date: Re: Linking a menu item between two different classes
  • Previous by thread: Bring an application to the front
  • Next by thread: Is this logical?
  • Index(es):
    • Date
    • Thread