how to turn off computer using ESC key
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.
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
You will likely have a much easier time doing this with the free trial of Controllermate.
If you're on windows it might be easiest to use Auto Hot Key
http://www.autohotkey.com/
[OT sorry] mmmm by the way, anyone knows if it is possible to easily disable the windows key, in windows ?
Hey LSKA,
Could you drop off some example? I am also in the need of PC control via max, and project must to be in windows OS...
Unfortunately, mxj object is very poorly documented, reference do not says much, and I cannot find java-doc to read more about it...
What kind of class in mxj should be use to execute shutdown /s command?
Many thanks!
I agree with jdudeo, autohotkey is the way to go.
Hey to everyone who reads this thread
I found a nice solution to shutdown, restart or hibernate your pc from max.
Process is pretty simple.
First you need to create link with setting to shutdown your pc.
Here are link, that explains how to do it in different versions of windows.
http://www.computerhope.com/issues/ch000321.htm
After that you need to set in Max to run this link via message box.
; max launchbrowser yourlink.lnk
for example: ; max launchbrowser C:/User/me/Desktop/shutdown.lnk
once you click it, max will launch link, which triggers system to shutdown.
You can even use ; max quit then shutdown by using trigger b b, first quits max, then shutdown pc, or set it to ESC button or anything you like.
Hope this will help someone.