Score for installations - disable crash recovery, open .score files with launchd

Hi all, I’m working on an installation that I’d like to make as plug-and-play as possible. The installation is running Score and Max on a Mac Mini. It won’t have a keyboard/mouse/monitor connected, and should ideally automatically load and start working when power is connected. I’d like to be able to use a launchd agent to automatically load a specific .score file into Score when the machine boots, and to re-open this file if Score crashes. I’m having two issues:

  1. I’m trying to open the specific .score file using /usr/bin/open /path/to/file.score in the launchd plist. This causes Score to open, but rather than loading the .score file, it just starts up with a blank template. I notice also that even if I set .score files to always open with Score (using the Finder info panel), double-clicking on .score files in Finder just opens Score with a blank template. Is there a way open .score files with Score from the command line or Finder, rather than having to load them from Score’s menu? If it doesn’t exist, could this be added?

  2. When Score is opened after a crash, it automatically prompts you to reload your work. Is there a way to disable this crash recovery prompt?

For 1. I remember I solved that by sending the command twice (with a delay in between) to a shell object in max. The first time it opened score, and the second one the scenario. That was in v1, though

For 2 I guess that could be added to the preferences (don’t know if it’s trivial or not, I suppose it is but I might be wrong)

I guess you could run the following command :

/path/to/score --autoplay --no-restore my_file.score

–no-restore disables the crash recovery, --autoplay will start playing as soon as the score is loaded.
There’s also --no-gui if you don’t want to launch the UI

Thanks for the info. @jcelerier. I finally got the chance to test that command today. The --autoplay flag doesn’t seem to actually cause Score to start automatically playing on my system. Let me know if you want me to do any specific tests here.

Also, I think it would be nice for general users if all these flags could be set via the GUI, e.g. in the Preferences window.

Hi @jcelerier. Please forgive my documentation neurosis :slight_smile: , but are there other options like these ? Are they available somewhere ?

hi @jln- !

Running score in a terminal with --help should give all the options. On mac you need to do

$ ./score.app/Contents/macOS/score --help

The options are handled here in the code :

Thanks ! Unfortunately, running this throws me an error and Score (a6) crashes immediately.

MBP-de-Julien:~ jln$ /Applications/Score.app/Contents/MacOS/score --help

QCoreApplication::arguments: Please instantiate the QApplication object first
Segmentation fault: 11

Crashloh here: https://gist.github.com/jln-/76508bfbc6d8f08355a65da2c95b5803

should be fixed in the next release