Forums > MaxMSP

opendialog default location

Sep 03 2012 | 11:13 am

Does anyone know how to make the dialog window that opendialog calls navigate to an initial default location? For example, I want the user to be able to nominate a specific folder when they want to open a particular file (like .MID or .aif etc), to be directed to their chosen default location (such as C: users/me/"my MIDI files folder"/ ), rather than an arbitrary location. I am unclear on how to do this or whether it is possible. Could it have something to do with the filepath object? Would there be a java-esque solution to this?

Sep 03 2012 | 6:29 pm

good question . seems like the opendialog does not accept any location suggestion . u can do it by creating your own popup , even create folder structures with jit.cellblock for example . ive done something like this . u are not limited in this case then .perhaps there are some Java solutions but i dont know .

but u need to provide a special logic to the system that check things . if u are sure about the DISK letters and stuff then this is very easy task i guess . if you are creating this for several people then there might be a problem .
so im wondering if there is some Java solutions existing .
lets wait

ah u can of course let the user setup their locations :D forgot that .so no problem !!!

let me know if u follow . if there are no other solutions im might be able to help you i guess

Sep 03 2012 | 10:10 pm

thanks KrisW,

I guess what I’m looking for is for some sort of message sent to the Windows file open dialogue which can configure it. Maybe that can be done via Java– I don’t know. But I wouldn’t mind having a look at your cellblock version just to see if that’s a viable alternative for me. It will eventually go in a standalone, but will only be for one set of users (not distributed).

Sep 04 2012 | 11:36 am

OK solved (about 5 years ago! ) — for anyone interested, check out mxj filebrowse by Topher Lafata; seems to work well, you can determine it’s default location as an argument or as a "root" message. It’s on the share page:

Sep 04 2012 | 4:48 pm

Great Terry !!! thanks

Feb 09 2013 | 8:03 pm

this is just AWFUL! How could anybody be developing the [opendialog] and [savedialog] objects and not be thinking about this?
It’s totally crazy to have to spend half a minute browsing my harddrive whenever I want to get to my files.

(that filebrowse you mention as "solution" is unfortunately not an object but just some evil java thing)

Feb 24 2013 | 12:30 am

Am looking for a solution to this problem also – and although I see that [mxj filebrowse] could be handy in some situations, it’s a heavy-handed solution for simply needing to specify a default location.

May 23 2013 | 8:06 am

Bump and +1!

Defining a default location is something really essential when working with dialogs…
Is there any plan to add a default path in some point in the future? Java stuff is not really the cleanest solution…

May 23 2013 | 2:17 pm

+ 1


Sep 27 2013 | 10:22 pm


Mar 14 2014 | 5:48 am


(really… ;-))

Apr 10 2014 | 10:08 am

I would also really appreciate to be able to specify a default folder to open using opendialog.

Apr 08 2016 | 6:18 am

yes, please! I can’t beleive it’s not possible.
(sorry if it has been added in max7, still under 6 here)

Apr 08 2016 | 10:31 am

this must be a new sports round here to revive old threads.

mind you, it would be against the usual paradigms of OSX and windows if an application would have a default location for file dialogs.

and it would probably require to rewrite the object, because currently it creates OS-supplied save and load windows.

just in case you are not aware … in most situations you will need to open or save files in conjunction with objects which also have a custom load and save function.

for example using "open mypath/001.aif" with buffer can be a good alternative to the dialog object, and the default path can in this case even be set patcher-individually or object-individually by the user. such implementations will also survive a change of the OS user or runtime instance, and make it generally easier to handel paths outside the max seearch path.

Apr 08 2016 | 10:56 pm

it seems you really don’t want that feature request to become reality :)
Don’t be too anxious about it, we are not asking for something that would break the current behaviour or your previous work.

I just want the user to specify a folder path through opendialog. I want to open it a default location if he never did it, and then at the last picked location. that’s a fair request.

> and it would probably require to rewrite the object, because currently it creates OS-supplied save and load windows.

As max is juce based, my guess is that opendialog just uses the class FileChooser, and its constructor gives that option.

Dec 15 2016 | 5:13 pm

+1 it’s not acceptable that users have to start from root again and again instead of starting browsing at the last used location.

Dec 15 2016 | 6:34 pm

if you already know what folder you want to browse – then why do you use the opendialog object at all?

Dec 16 2016 | 2:56 am

Hi Roman, no we don’t know the next item that will be choosen by the user but we surely know the next item will probably be closer to the last selected node of the tree structure than to the root node. O.

Dec 16 2016 | 6:47 am

and with item I mean folder as the path reset only happens with filetype set to ‘fold’. The default file selector is returning to the last location as expected.

Dec 16 2016 | 8:20 am

i believe the opendialog objects purpose is to give you access to the OS file browser they way the OS does.

if it would have additional features such as "always go to last location" for folders, that might override or conflict with someones OS file browser settings.

personally i could not work with OS9 or OSX without "default folder" or similar tools anyway.

Dec 16 2016 | 10:30 am

yeah alright, so this is another task for a selfmade solution. this should work with jit.cellblock

Dec 16 2016 | 4:46 pm

242.axial :)

well yes, i rechecked the situation (of the OP) and i must admit that it might feel strange that you cant tell it to open a certain path while the same is possible around most other objects.

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

Forums > MaxMSP