Hello Guest it is March 28, 2024, 10:57:36 AM

Author Topic: Gcode File section script  (Read 7922 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Gcode File section script
« on: March 08, 2013, 12:40:05 PM »
Hi ALL, Here is a button script that allows you to load a gcode file from a set directory and filetype.

(;-) TP



'Gcode Selection Box
Sub GcodeSelect
    Dim MyList()
    Begin Dialog GcodeFileDlg 60, 60, 190, 220, "MACH3 Gcode Program Select", .DlgFunc
        ListBox 10, 10, 150, 180, MyList(), .List1, 2
        CancelButton 42, 198, 40, 12
        OKButton 90, 198, 40, 12   
       
    End Dialog
   
   
    Dim Button As GcodeFileDlg

    Dim frame As GcodeFileDlg
 
    ' Show the GcodeFile dialog
    Dialog frame
End Sub
 
Function DlgFunc( controlID As String, action As Integer, suppValue As Integer)
 
   
    Select Case action
    Case 1 ' Initialize
        temp = Dir( "c:\Mach3\Gcode\*.tap" )
        count = 0 
        While temp <> ""
            count = count + 1
            temp = Dir
        Wend
        Dim x() As String
        ReDim x(count)
        x(0) = Dir( "c:\Mach3\Gcode\*.tap" )
        For i = 1 To count
            x(i) = Dir
        Next i
        DlgListBoxArray "List1", x()
       
    Case 2 ' select
     If controlID = "OK" Then
  LoadFIle("c:\Mach3\Gcode\" &DlgText("List1"))
End If

End Select

End Function

End

Re: Gcode File section script
« Reply #1 on: June 07, 2015, 01:04:28 PM »
please how to use your example to load the code g
surely that should add a button and the code where you shooting in a Mfunkciju ?
thanks

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Gcode File section script
« Reply #2 on: June 09, 2015, 08:54:58 AM »
You add a button to your screen then insert teh script into the button. THEN just push the button.

(;-) TP
Re: Gcode File section script
« Reply #3 on: March 08, 2016, 03:56:21 PM »
extra   

greeting