Hi,
I reused a piece of LUA code I found in one of the LUA Examples folder that ships with Mach4.
It is a file navigation panel which allow you to browse for a file and open it. Its structure and
operation owe more to wxWigets than LUA or Mach4....
inst = mc.mcGetInstance();
-- create the wxFrame window
mainframe = wx.wxFrame( wx.NULL, -- no parent
wx.wxID_ANY, -- whatever for wxWindow ID
"DummyFrame", -- frame caption
wx.wxDefaultPosition, -- place the frame in default position
wx.wxDefaultSize, -- default frame size
wx.wxDEFAULT_FRAME_STYLE ); -- use default frame styles
-- create a panel in the frame
panel = wx.wxPanel(mainframe, wx.wxID_ANY);--We are not going to show it but we need to have this to use the File dialog
local file = wx.wxFileDialog(panel, "Select Probe File", "", "", "Text files (*.txt)|*.txt|Tap files (*.tap)|*.tap",
wx.wxFD_SAVE,wx.wxDefaultPosition,wx.wxDefaultSize, "File Dialog" );
if(file:ShowModal() == wx.wxID_OK)then;
local pathRPF = file:GetPath();
-- Edit this format statement at your own risk
mc.mcCntlProbeFileOpen(inst, pathRPF, "X%.4AXIS_X Y%.4AXIS_Y Z%.4AXIS_Z\r\n", true);
Maybe of use.
Craig