close standalone with window-close button (X)

May 29, 2010 at 12:08am

close standalone with window-close button (X)

Hi, maybe a newbie question:

By default, standalone built by Max quits with File menu or Ctrl+Q (on windows)
Is there a way to enable the red X button on right hand corner and close the application with it? now it’s grayed out.

Thanks!

#50631
May 29, 2010 at 2:19am

If I understand what you want to do, you have to do a few things.

First, you need to enable the window close button. This is done with a window message to thispatcher with a loadbang.

You then need to tell Max that when the patcher is closed, you want close the app. You can do this with a closebang that triggers a message to Max:

– Pasted Max Patch, click to expand. –
#181632
Jul 22, 2010 at 5:19pm

Hi to all

I don’t know if the method Ben proposes is a good one or has a bug. I tried this on Max 5.0.7, WinXP Professional 32-bit, and I had a problem. Ok, if you try to build a simple .exe application it will close just fine; however the application still runs if you check the Windows Task Manager under the Processes tab. So unless this has a workaround, I believe it can cause far more problems than to solve.

All the best,

Stav.

#181634
Jul 22, 2010 at 5:35pm

Hi Stav,

I can’t repro here. Please update to 5.1.4: http://www.cycling74.com/downloads

-Ben

#181635
Jul 23, 2010 at 1:43am

 
[closebang]

|

“;max
quit”

#181636
Dec 4, 2012 at 4:50pm

Sorry to reignite an old topic. I’ve just been trying Ben’s method on a standalone built from Max 5.1.9 and it works fine on a Windows 7 machine. However, on Windows XP, even though the application seems to close I get a Windows error message saying “MaxMSP has encountered a problem and needs to close. We are sorry for the inconvenience”. It does not continue to run in the background if I check the task manager however.

#181637

You must be logged in to reply to this topic.