Hi
I'm trying to semi auto my Mach3 by adding a file-loading Macro(M555) at initialization string.
and wish to have Mach3 to run a Macro (M159) to call a App.exe at the end of my Gcode
However, when I press the RESET button to initial the Mach3, Mach3 run M555 correctly , but launch M159 at same time (which I wish to be run at the very end of the process)
Is there anyone can give me some suggestion to get this right?
Thanks!
here are the codes I use:
M555: LoadFile ("C:\Sample.NC")M159:(referenced from
http://www.machsupport.com/forum/index.php/topic,13960.0.html)
Option Explicit
Dim CmdString As String
Const Filename = "C:\Run.exe"
Const AppFQFN = "C:\windows\system32\CMD.exe"
CmdString = """" & APPFQFN & """" & " " & """" & FileName & """"
Shell(CmdString)
my Gcode-Sample.NC:G00 G49 G40.1 G17 G80 G50 G90
G21
M6 T1
M5 M9
M159
M30