Set default saving path / folder

Jan 9, 2008 at 7:52pm

Set default saving path / folder

Hi all,
I have a patch where I want the user to be able to save screenshots (of a GL window, using jit.desktop –> jit.matrix) at any time, and the shots will be saved automatically with an incremental name like “image_5.png” etc. No problems with the matrix, commands, or the syntax, but when I do it, I can’t find where the files are saved. I haven’t tried this with a stand-alone version, just with the regular Max app. I seem to remember they got put somewhere in the Cycling folder, but I can’t find them there either… When I force a dialog box they save fine.

So really all I want is to be able to easily tell Max that “whatever file is saved, without any specified path, goes into this folder”, i.e., the current patch folder, ideally without having the user need to select it beforehand. Looked as the conformpath etc. objects, and the ;max commands, but am not sure how to make it all work. Probably missed something.

Thanks a bunch, I know it’s probably simple. It would be very handy for other stuff as well, like audio snippets etc. Stuff you don’t really need to go looking for with a dialog box, but don’t want to keep all in RAM all the time either, so you could load and re-load them from a custom browser within Max (like dropdowns, a thumbnail palette, etc).

Windows XP, 4.6.2

–CJ

#35291
Jan 9, 2008 at 8:08pm

On 9 janv. 08, at 20:53, Seejay James wrote:

> So really all I want is to be able to easily tell Max that “whatever
> file is saved, without any specified path, goes into this folder”,
> i.e., the current patch folder, ideally without having the user need
> to select it beforehand. Looked as the conformpath etc. objects, and
> the ;max commands, but am not sure how to make it all work. Probably
> missed something.
>
> Thanks a bunch, I know it’s probably simple. It would be very handy
> for other stuff as well, like audio snippets etc. Stuff you don’t
> really need to go looking for with a dialog box, but don’t want to
> keep all in RAM all the time either, so you could load and re-load
> them from a custom browser within Max (like dropdowns, a thumbnail
> palette, etc).

You may have a look to the “path” message for [thispatcher] which
returns the absolute path of the patch. With that information, it’s
fairly easy to construct the file path of whatever you want to save
using the [sprintf] object which allows you to concatenate
“strings” (I’d also recommend using the “symout” argument of [sprintf]
in order to make sure that you get one symbol which represents the
absolute path, even if there’s spaces in it).

Cheers,
ej

#120164
Jan 10, 2008 at 12:20am

Fantastic. I think I can make it work from that, thanks!

–CJ

#120165

You must be logged in to reply to this topic.