Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

applescript and objective c



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.