Save the patcher function inside a standalone


    Sep 06 2017 | 11:41 pm
    I built a standalone app and would like to include a function that the patcher saves to disc at closebang without having a Mac dialog appear. The idea is to save a few data in the app each time it is closed without asking the user to save it. Is there any command available to do so? I checked the complete browser but cannot find any. Is there are workaround to get there? Thanks!

    • Sep 07 2017 | 12:56 am
      You'll need to save stuff to the standalone's preferences folder.
      Cheers
      -A
    • Sep 07 2017 | 3:32 am
      Hi Andrew, thanks for your quick response, but please forgive my stupidity: - my app does not have or create a preference folder, or at least I cannot find it. Where would it be? In user/Library/Preferences? - and how do I save to the preferences? Sorry I've never done that... - is there any tutorial or so?
      Thanks again
    • Sep 07 2017 | 6:34 am
      this https://cycling74.com/tutorials/get-your-max-standalone-on-apple%E2%80%99s-mac-app-store has information re mac but I think you can apply it to windows too
    • Sep 07 2017 | 3:30 pm
      You can set a custom name for your app's prefs using the standalone object, in its inspector.
      Then you do something like
      to get the path to it, which you can use to save things. In general, users do not have permission to modify apps folders.
      Cheers
      -A
    • Sep 09 2017 | 1:21 am
      Thanks Andrew and thanks to Floating Point. That solved my problem, many thanks
    • Sep 09 2017 | 5:29 am
      Sorry Andrew and Floating Point, but the problem is not solved yet. Yes I can create a folder in "~Library/Application Support", write a .txt-file into it, but I can't read it out, because the separation of the two words "Application" and "Support" makes any "read" command to the "Text"-object assuming additional arguments. When I make a symbol out of the path, it cannot find it. How do I access "Application Support" from within a patch?
      Thanks and sorry for bothering so much.
    • Sep 09 2017 | 7:03 am
      you need to enclose the file path in double quotes, for example: (read "my mac/Library/Application Support/my text.txt")
      you can use the tosymbol object to help with this
    • Sep 09 2017 | 8:17 am
      Hi Floating Point, many thanks, in the meantime I found it. I just made to many trials, so that I got confused, I had the solution already, but did not see it, due to over concentration. Sorry for bothering Many thanks again and have a good day... Hans Peter