Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Ironwright on December 13, 2022, 03:14:49 PM
-
I have a touchscreen on my machine and would like to create a shutdown button. Any ideas what lua code I would need to shutdown the program safely? I wrote a batch file to shutdown the computer, but mach needs to be closed properly before that to avoid corrupting's the INI file.
-
You can use:
scr.Exit(false)
-
Works like a charm. Thanks!
I move the machine just off the home position, then call the screen exit and a call to os.execute a shutdown.bat file after that. I put a 6 second delay in the shutdown to give Mach4 plenty of time to shutter.