Hello Guest it is March 28, 2024, 06:03:40 PM

Author Topic: touchscreen shut down button  (Read 325 times)

0 Members and 1 Guest are viewing this topic.

touchscreen shut down button
« 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.
Re: touchscreen shut down button
« Reply #1 on: December 14, 2022, 12:07:17 PM »
You can use:

scr.Exit(false)
Re: touchscreen shut down button
« Reply #2 on: December 14, 2022, 03:21:17 PM »
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.