Forums > MaxMSP

how to turn off computer using ESC key

July 7, 2013 | 2:51 am

hello.

I will make my patch running automatically as the computer boots,
I also want the user press ESC key to turn off the computer, as normal as possible.
I don’t want it to be forced shutdown.

thx.


July 7, 2013 | 3:21 am

You could experiment with launching a shell script (using the shell object) which contains a shutdown command. However, I’ve never tried it.

HTH,
Ádám


July 7, 2013 | 8:14 am

You will likely have a much easier time doing this with the free trial of Controllermate.


July 7, 2013 | 11:39 am

Presuming you’re working on a Mac:
<code>

– Pasted Max Patch, click to expand. –

</code>

on windows you can send the shutdown /s command via the
mxj class


July 7, 2013 | 7:12 pm

If you’re on windows it might be easiest to use Auto Hot Key

http://www.autohotkey.com/


July 8, 2013 | 1:50 am

[OT sorry] mmmm by the way, anyone knows if it is possible to easily disable the windows key, in windows ?


Viewing 6 posts - 1 through 6 (of 6 total)