Forums > MaxMSP

Access to values in File Preferences

Feb 03 2012 | 11:49 am

When one adds a new entry to the File Preferences list, you give a name and a path.

Is there a way to retrieve a specific path programatically, given the name?

Feb 03 2012 | 5:17 pm

not sure what you mean, [absolutepath] gives you the path of a file in searchpath.

Feb 03 2012 | 5:24 pm

If you click on File Preferences, you can add new folders to the search path. Those folders are given names. I would like to be able to use a name to find the appropriate search path.

However, I just read the documentation on File Preferences and it says

"You can give the entry you add to the search path a name in the Name column. However, this name has no functional importance and is only for your future reference."

so I am SOL (sigh)

I’ll have to see if I can figure out how to get the value of an environment variable instead.

Feb 03 2012 | 6:07 pm

didn’t notice there’s a name column. the env variables you’ll only get via external AFAIK. O.

Feb 04 2012 | 1:07 am

I have solved this problem by putting a Max object that returns the path where it is located into each folder on my search path. The name of the object is the same as that defined in the File Preferences (just for convenience).

Feb 04 2012 | 1:18 am

The File Prefs should be stored in a file somewhere, though I just looked and couldn’t find it. If so, you might be able to load it into [text] and parse it somehow.

Feb 04 2012 | 1:37 am

Not a bad idea. However, it would be nice if Cycling74 would add an object to a future update that can retrieve the path given the name.

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

Forums > MaxMSP