Re: Launching an App without NSWorkspace?
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.