Adding patcher's folder to search path automatically (and explicitly)

Apr 20, 2008 at 2:14pm

Adding patcher's folder to search path automatically (and explicitly)

I have noticed a buffer loads a soundfile indicated as argument if it
is located in the same folder even if that folder is not in the
search path. However if I want to load the same soundfile manually
using the “replace” command I get a “can’t open” error message.

Therefore I would like to add the patcher’s folder in Max’s search
path. I want it to be done automatically when the patcher is loaded,
not manually (an additional reason not to do it manually is the
patcher will probably be used with Max Runtime rather than Max, so no
“File Preferences” window will be available anyway).

I know the filepath object might be used to add a folder to Max’s
search path. However is there a way to know an opened patch’s path?

Thank you in advance.

Roald Baudoux

#37026
Apr 20, 2008 at 2:31pm

#127475
Apr 20, 2008 at 3:17pm

#127476

You must be logged in to reply to this topic.