path to standalone from within standalone?

Feb 16, 2009 at 11:07pm

path to standalone from within standalone?

I want to be able to launch a pdf that I will bundle with my Max
standalone application. I will include the pdf within the Mac
application bundle, or within the “support” folder next to the
Windows .exe.

I wanted to use the following message to max:

; max launchbrowser file:///path/to/my/file/foo.pdf

This works fine when I can reliably get the path to the file. But
how do I generate the correct path when considering my standalone?
Is there a way to know the path to my standalone itself?

I have a feeling I’m missing something very obvious…

Dan

Dan Nigrin
Defective Records
202 Hack / PC-1600 User / VSTi Host / OMS Convert / Jack OS X / Major
Malfunction
http://www.defectiverecords.com

http://www.jackosx.com

#42340
Feb 16, 2009 at 11:20pm

Hi Dan,

Last time I did this in max 4.6 the below worked for me. There may be other ways, or things may have changed. The sprintf added the name of my app and the folder I wanted. However, this won’t work if the name of the apps been changed….

Regards

Alex

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 75 243 241 196617 sprintf %sGEViewGetter.app/Contents/Resources/;
#P newex 75 218 32 196617 r app;
#P window linecount 2;
#P message 132 198 105 196617 ; max sendapppath app;
#P connect 1 0 2 0;
#P window clipboard copycount 3;

#151532
Feb 16, 2009 at 11:24pm

Does [path( -> [thispatcher] also work in standalones ?

Ciao

#151533
Feb 16, 2009 at 11:52pm

Am 17.02.2009 um 00:20 schrieb Alex Harker:
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 75 243 241 196617 sprintf %sGEViewGetter.app/Contents/
> Resources/;
> #P newex 75 218 32 196617 r app;
> #P window linecount 2;
> #P message 132 198 105 196617 ; max sendapppath app;
> #P connect 1 0 2 0;
> #P window clipboard copycount 3;

Hi,

I don’t know what has changed in 5 either but in 4 you can use
sendapppath, but use sprintf symout, or your app won’t work with
spaces in the path name (like sadly many maxbuild apps do). You might
run into problems creating a “send max” object for you dynamic path,
but I think forward works.

best,

g.

#151534
Feb 17, 2009 at 12:34am

Thanks guys – sendapppath is what I was forgetting!

Dan

#151535

You must be logged in to reply to this topic.