• 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: Fun and games with Applescript "Standard Suite" in Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Getting the image of a window?
  • Next by Date: ---Help Needed for CocoaVitae.com--- Was: Re: Docs
  • Previous by thread: Re: Fun and games with Applescript "Standard Suite" in Cocoa app
  • Next by thread: Re: Fun and games with Applescript "Standard Suite" in Cocoa app
  • Index(es):
    • Date
    • Thread