can we set opendialog & dialog default folder ?


    Jan 11 2021 | 11:27 am
    Hi there,
    I never found a solution for setting up the default folder that is opened when we use opendialog or dialog objects.
    When I setup an application for someone else, I'd like to setup this default folder to provide an easier way to my users to find specific files related to my application.
    Anyone ?

    • Jan 11 2021 | 11:54 am
      not possible as far as I know
    • Jan 17 2021 | 11:05 am
      I think it is related to Operating System, maybe. That's very annoying not to be able to control this.
      I didn't find any workaround (like opening and closing another dialog automatically at loadbang time etc)
    • Jan 17 2021 | 11:36 am
      There are 3rd party utilities to manage default folders on OSX.
    • Jan 17 2021 | 11:39 am
      Thanks for your answer. Would you have references for this ?
      Actually, controlling that in Max (especially in built applications) would be very useful. And I think I miss something. Maybe at the building time, it is possible to set up something, but I can't find what.
    • Jan 17 2021 | 2:04 pm
      I never tried it, but I hear quite often about this.
    • Jan 17 2021 | 3:00 pm
      Text file maxdialogpaths.txt should actually do something in that respect, but it never really worked reliably for me. I gave up on it long time ago. It sometimes gets filled with filetype related last used absolute paths, but then it does not work at all. In Max Preferences file there is last root directory entry which is the only one that really does open last used path on next max launch, but then you are not allowed to write anything into that file. Anyway, for example to set default path when one runs opendialog fold, bang for example this message : ; max setdialogpath fold ~/Documents which is unix short for users documents folder. or any other absolute path. Then any following open or save dialog would open that path. Same could be done with absolute path to the app if that is what you originally asked for. But whenever one opens some other location it overrides the originally set one, so that you need to resend that message prior to any open or save dialog...
    • Jan 17 2021 | 5:27 pm
      yes, it is first of all an OS thing. on mac you can use third party apps such as default folder to circumvent it. paths relative to user or relative to patcher are also doable, everthing else is not really my taste.
    • Jan 18 2021 | 7:27 am
      Thanks a lot. The setdialogpath message to max seems to work totally well.
    • Jan 18 2021 | 2:51 pm
      Actually it is working FINE, on macOS only
      (or I totally missed something on windows. actually, I tested several path syntax. but even C: doesn't work)
    • Jan 18 2021 | 3:29 pm
      You won't get far on windows. Only single thing I got working was to force max to use specified location to save NEW created .maxpat - patches. Seems to be only filetype - msav that gets accepted on windows. As I said I gave up on all that long ago.