Hi ALL, This is a button script to allow you to search through a loaded Gcode file. It advances to the next M6 it finds in the current file. If no file is loaded then it errors OUT and ends.
(;-)TP
'Macro for GcodeFile string search
Dim sLine As String
Dim i As Long
Dim lFoundLine As Long
Fname = FileName
If Fname = "No FIle Loaded." Then
MsgBox" There is NO File Currently Loaded in Mach3"
End
Else
Open FIlename For Input As #1
Do Until EOF(1)
lFoundLine = lFoundLine + 1
Line Input #1, sLine
If InStr(1, sLine, "M06") > 0 And lfoundline > GetDro(16) Then
Exit Do
End If
Loop
Close #1
Nline = (lfoundline -1)
MsgBox""&Nline
Setdro(16,Nline)
End If
End