• 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: Launching an App without NSWorkspace?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launching an App without NSWorkspace?


  • Subject: Re: Launching an App without NSWorkspace?
  • From: Rosyna <email@hidden>
  • Date: Thu, 5 Sep 2002 05:08:11 -0700

<some app> must be known by LaunchServices when you run this script or else it will not function as you hoped. The standard is to ask the user for the path to the app at this point.

And why not NSDictionary* theError=NULL; then later no [theError release]; ?

Ack, at 9/4/02, Mark de Jong said:

As a different approach, you could use AppleScript to launch an app. So, starting with Mark Steinberg's code, we make some simple modifications as follows:

NSAppleScript *theScript = [[NSAppleScript alloc] initWithSource:@"tell application \"<some app>\" to activate\r"];
NSDictionary *theError = [[NSDictionary alloc] init];
[theScript executeAndReturnError: &theError]; //Probably a good idea to check for errors
[theScript release];
[theError release];

and "<some app>" should launch. My tests show that this works.

--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me remember what we were talking about. Thanks.
_______________________________________________
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.
  • Follow-Ups:
    • Re: Launching an App without NSWorkspace?
      • From: Mark de Jong <email@hidden>
References: 
 >Re: Launching an App without NSWorkspace? (From: Mark de Jong <email@hidden>)

  • Prev by Date: Re: cString deprecated!
  • Next by Date: Re: Request for Guidance
  • Previous by thread: Re: Launching an App without NSWorkspace?
  • Next by thread: Re: Launching an App without NSWorkspace?
  • Index(es):
    • Date
    • Thread