Forums > MaxMSP

coll file path

Jan 05 2010 | 3:25 pm

I’m using a formatted message derived from absolutepath to get a coll to save its contents to a specific folder related to the app I’m building. I get the path, add the folder name and the file name and dump it into a message box. The nessage box is banged by a button, and the message is sent thru [prepend write] to the coll/

That all works fine.

What I want to do now is something similar for the Read message. I want the file dialogue to open in the specified folder, rather than wherever max "was" last (which is what happens if you just send the "read" message). I tried prepending read to the path to the folder, but that doesn’t work. This will work if I add the filename, but that will obviously open the named file, rather than allowing the user to choose which file they want (without knowing in advance).

Is there a way to send a read message to coll that gets it to go to a specified folder?



Jan 06 2010 | 12:36 am

A way to do this would be nice: you don’t know which file you want, but you want a specific folder to open when you click "read" or "open", with any object that does this. Like "readfolder [folderpath]". Maybe if the files are already there, you could use a [umenu] instead, but the above tactic would still be a nice addition.

How about a new message to max:

; max setcurrentdefaultfolder [folderpath]


Jan 06 2010 | 1:46 am

i’m trying this for the moment
i found the patch here on the forum (i have no name sorry)
i’ve added one connection or two in order to have the jit.cellblock
loaded when opening a patch
there must be some machine in there to make your tweaking

-- Pasted Max Patch, click to expand. --

Jan 06 2010 | 9:46 am

I take it from seejay’s message that this is currently not possible. I think for now that I’m going to have predetermined file names without the option for the user to name the files. Which means I can use the path/filename message to open the files i want.

It would be good to have the option to open a specific folder, to define a specific path for a file operation, as seejay suggests.

Jan 06 2010 | 12:44 pm

If you’ve restricted saving files to one location you could always create your own open dialog. Perhaps try sending your path to the [folder] object, where you can set it to only output text files. Here’s an example that uses [umenu] and [jit.cellblock] as displays and implements further filtering so you can’t accidentally open unwanted text files.


-- Pasted Max Patch, click to expand. --

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

Forums > MaxMSP