Launching standalone by double-clicking a file

Aug 19, 2009 at 4:45am

Launching standalone by double-clicking a file


I apologize if this sounds like a totally silly question from a newbie. I searched the archives without success.

Is it possible to launch a standalone application by double-clicking a file created with that standalone? (like a MIDI file that you have saved from the standalone).

If yes, is the standalone able to “know” what file was double-clicked?


Aug 19, 2009 at 7:17am

With the standalone object it is possible to give a creator code to the to be built application. At least that is how it works with apple. You can easy apply for a code somewhere on the developers website. Now it is possible to bound files to the app, including creating custom file icons. Double clicking then launches the app. The problem is that, to my knowledge, there is no way of telling the app what to do with the file you double clicked. E.g. if a midi file should be read by a seq, I have no idea how to tell the seq object to do that. So the answer to the latter part of your question is no, as far as I can tell.


Aug 19, 2009 at 9:16am

There’s an undocumented/unsupported object called opened which tells you the path and the type of the file which launched the app. You need to do the appropriate file association in your app’s Info.plist. Apple’s developer website has all the information you need about that part.

Aug 19, 2009 at 3:07pm

Thank you Emmanuel Jordan. Where can I find the opened object? It’s not in, nor could I find it using Google. I guess opened is just a too common word.


Aug 19, 2009 at 4:30pm

I was under the impression that [opened] had stopped working in max5. Perhaps that’s just for when dragging a file onto the application icon that it no longer works (even though, that should be the same ‘odoc’ apple event)

If opened works again now I’ll be very happy.

Aug 19, 2009 at 4:59pm

I’m still working with 4.6. Where can I get the opened object?

Aug 19, 2009 at 5:05pm

Ah. From what I recall, it’s built-in. just make a new object and type ‘opened’ into it. I don’t think it has a help file, though.

Aug 19, 2009 at 5:21pm

Yes! Thank you!!

Aug 19, 2009 at 5:23pm

undocumented, unsupported. But last time I used it, it worked fine.


You must be logged in to reply to this topic.