relaunchmax — can't get patch file to open too

slo ~|•'s icon

The new message to Max: relaunchmax seems great. The documentation for the message states "If relaunchmax is followed by an optional symbol that specifies a file name or path name, the Max patch referenced by that file name or path will be opened at launch." I have not been able to get this to work, trying with both filename and path. Has anyone had success with this yet? Am I missing something? :-)

OS X Version 10.10.5, Max 7.1

Chris's icon

I also can’t get that behaviour to work. Relaunching works, but can’t get a patch to open on relaunch.

Mac OS X Version 10.9.5 x86_64
Max 7.1.0 (667771f) (32-bit mac)

Jeremy's icon

That was a bug in the blog post, which should have been fixed already. Relaunching Max will cause the previously open windows to re-open, assuming that this option is enabled in the preferences.

Edwin van der Heide's icon

Slightly off topic: I've just tested whether it also relaunches a built standalone application and it does. This is great!

Chris's icon

Thanks, @Jeremy — does that mean the documentation in the ‘Controlling Max with Messages’ guide is inaccurate?

relaunchmax

The word relaunchmax causes the Max application to close and relaunch. If relaunchmax is followed by an optional symbol that specifies a file name or path name, the Max patch referenced by that file name or path will be opened at launch. This is useful in conjunction for situations involving patches which are intended to run unattended (e.g. installations).

slo ~|•'s icon

@Chris, thanks for testing and following up.

@Jeremy Ah! I thought I had noticed a change in the blog post. :-) Also +1 on Chris' question regarding the documentation.

Arvid Tomayko's icon

relaunchmax doesn't seem to work in a standalone in Max 7.3.1 on mac :( Works fine in Max proper, but in the standalone, clicking the message box just does nothing. Also it gives me a console warning when I try to give a path to a patch as in the documentation:max: extra arguments for message "relaunchmax"

@EDWIN VAN DER HEIDE - how did you get it to work, or is this a regression since whatever Max version you were using at the time? (7.1 i'm guessing around that time)

Arvid Tomayko's icon

Figured out a way to relaunch a Max standalone on Windows using a batch file if anyone is interested. Send the ;max launchbrowser message with the path to a batch file (relaunch.cmd) followed by a deferlow'd ;max quit. The batch file checks if the standalone is still running once a second. When it no longer is,the batch file re-launches the standalone and exits. Tested on Windows 7 and 10. Fill in your standalone's name in the batch file and place in the folder with the standalone's .exe.

Max patch:

Max Patch
Copy patch and select New From Clipboard in Max.

Contents of relaunch.cmd, in typically obtuse windows command-line jargon:

@ECHO OFF
ECHO.
ECHO Relaunching MyStandalone
ECHO.
:start
tasklist /FI "IMAGENAME eq MyStandalone.exe" 2>NUL | find /I /N "MyStandalone.exe">NUL
if "%ERRORLEVEL%"=="0" (
    echo Program is still exiting - please wait
    timeout /t 1 /nobreak>nul
    goto start
)
cd /d %~dp0
start "" "MyStandalone.exe"
CLS
EXIT 
sousastep's icon

I can’t get a patch to open on relaunch either, but would appreciate this feature!