Handler for "open with" contextual menu


What handler do I need to add to an AS application to support “open with” from a finder contextual menu (e.g. right click on a file on the desktop and select “open with” and then the AS program)?
What parameters (names) are passed by the contextual menu?

Without a handler the program opens up but the file needs to be loaded manually.


I’m not certain, but when you create an “applescript droplet application” then you automatically get a handler called “on open names”. Names is a list of files to open. That’s probably the handler you need. As such you’ll need to rewrite your application using the applescript-droplet type instead of the normal applescript type. I don’t know of any way to convert a normal applescript application to a droplet type application.

You may want to create a new project to test my theory before rewriting your whole application… it may not work!