Forums > MaxMSP

Launching standalone by double-clicking a file

August 19, 2009 | 4:45 am

Hello

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?

Thanks
Alejandro


August 19, 2009 | 7:17 am

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.

_
johan


August 19, 2009 | 9:16 am

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.


August 19, 2009 | 3:07 pm

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

a


August 19, 2009 | 4:30 pm

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.


August 19, 2009 | 4:59 pm

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


August 19, 2009 | 5:05 pm

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.


August 19, 2009 | 5:21 pm

Yes! Thank you!!


August 19, 2009 | 5:23 pm

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


Viewing 9 posts - 1 through 9 (of 9 total)