Re: Fun and games with Applescript "Standard Suite" in Cocoa app
Re: Fun and games with Applescript "Standard Suite" in Cocoa app
- Subject: Re: Fun and games with Applescript "Standard Suite" in Cocoa app
- From: "Neal A. Crocker" <email@hidden>
- Date: Thu, 23 Aug 2001 23:25:26 -0700
By the way, what method should an NSApplicationg delegate implement
to handle this run applevent whenever it is sent to the app. on
startup and after it is already started.?
I may be wrong, but I bet the run event isn't handled by the
application at all,
but is probably handled by LaunchServices.
Perhaps, but after the application is started, using a command "run"
in an Applescript should send an appleevent to the target Cocoa app.
Applications (other than Applescript applets) tend to ignore this
event, but I was wondering if Cocoa provides a hook for implementing
behavior to handle this run event as it does with other Standard
Suite appleevents. I'm ultimately interested in creating a cocoa
app. which serves as a shell for an Applescript. In order for to my
shell to pass such an event to an Applescript, I need to figure out
some sort of hook. As for the first run event, which starts the
application, if is somehow intercepted by LaunchServices and never
sent to the shell, I can use an NSApplication delegate that
implements the delegate method "applicationDidFinishLaunching" to
send a run event to the script.
Thanks,
Neal