Re: applescript and objective c
Re: applescript and objective c
- Subject: Re: applescript and objective c
- From: Dustin Voss <email@hidden>
- Date: Fri, 17 Dec 2004 15:50:55 -0800
It sounds like you are saying that the Cocoa app executes a script when
the app starts up, and that the script displays a dialog box with a
quit button. In this situation, of course the app will have started
before the dialog box was shown.
Did you mean to say "but the application doesn't quit" instead of "but
the application still launches"? If so, how are you making the app
quit? Maybe there's a flaw there.
And is there an AppleScript Studio app involved here somewhere? AS
Studio apps need to be launched with NSTask, not NSAppleScript, as far
as I know.
On 17 Dec, 2004, at 7:44 AM, Martha I. Espinosa wrote:
Hi,
I created a cocoa application and have an applescript being called at
the beginning to do some metrics gathering. It displays a dialog box
with the quit button. The problem is that when I click on quit the
applescript quits but the application still launches...
Any suggestions?
NSURL *url=[NSURL fileURLWithPath: [[[NSBundle mainBundle]
resourcePath]
stringByAppendingPathComponent:@"some.applescript"] ];
NSAppleScript* script=[[NSAppleScript alloc]
initWithContentsOfURL:url error:nil];
[script executeAndReturnError:nil];
[theWindow makeKeyAndOrderFront:nil];
[script release];
Thanks in advance
-ME
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden