Hello Guest it is April 26, 2024, 03:30:34 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DazTheGas

71
Mach4 Plugins / Re: mcX360 Plugin for Lua
« on: August 08, 2018, 04:09:52 PM »
The example for the A does not run an mdi, a cycle start in general will start a loaded gcode file, you would need to change to something like

if GetXin("Btn_A") == 1 and A_Btn == false then
      scr.ExecMdi('mdi1')
      A_Btn = true
end

DazTheGas

72
Mach4 Videos / Re: ZeroBrane Tip - Custom AutoComplete
« on: August 05, 2018, 03:58:13 AM »
If only there was a like button, Cheers Tweakie :-)

73
Mach4 General Discussion / Re: LUA problem when exit a Wizard
« on: July 16, 2018, 01:56:44 PM »
it is the UI.MainWindow:Destroy() that is causing the problem, heres a more simpler aproach using the wx.wxEVT_CLOSE_WINDOW event
Code: [Select]
----------------------------------------------------------------------------
-- Lua code generated with wxFormBuilder DTG Version(Jan 2018)
----------------------------------------------------------------------------

UI = {}

-- create MainWindow
UI.MainWindow = wx.wxFrame (wx.NULL, wx.wxID_ANY, "", wx.wxDefaultPosition, wx.wxSize( 500,300 ), wx.wxDEFAULT_FRAME_STYLE+wx.wxTAB_TRAVERSAL )
UI.MainWindow:SetSizeHints( wx.wxDefaultSize, wx.wxDefaultSize )

UI.bSizer1 = wx.wxBoxSizer( wx.wxVERTICAL )

UI.m_button1 = wx.wxButton( UI.MainWindow, wx.wxID_ANY, "MyButton", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
UI.bSizer1:Add( UI.m_button1, 0, wx.wxALL, 5 )

UI.m_button2 = wx.wxButton( UI.MainWindow, wx.wxID_ANY, "MyButton", wx.wxDefaultPosition, wx.wxDefaultSize, 0 )
UI.bSizer1:Add( UI.m_button2, 0, wx.wxALL, 5 )


UI.MainWindow:SetSizer( UI.bSizer1 )
UI.MainWindow:Layout()

UI.MainWindow:Centre( wx.wxBOTH )
UI.MainWindow:Show()

-- Connect Events

UI.MainWindow:Connect( wx.wxEVT_CLOSE_WINDOW, function(event)
--do exit commands

event:Skip()
end )

There are a couple of ways you can make sure you have only one window
1. add to the MainWindow creation wx.wxSTAY_ON_TOP so its visible at all times so you know one is already open.
2. add a register so before the wizard is created it checks this register to see if its active IE if MainWindow is active then register == 1 and on exit the register == 0

DazTheGas

74
Mach4 General Discussion / Re: LUA problem when exit a Wizard
« on: July 16, 2018, 03:24:29 AM »
I have no idea if the wizard launcher opens the wizards in a private enviroment or is launching from the main stack, if you have created with formbuilder and both wizards have UI.MainWindow it could be the fact that when you destroy one the table UI has been destroyed or UI.Mainframe , in formbuilder try changing the table prefix so they are unique.

DazTheGas

75
Mach4 Videos / ZeroBrane Tip - Custom AutoComplete
« on: July 14, 2018, 04:25:34 PM »
Well here's another tip on how to add your own modules and functions to the autocomplete in ZeroBrane Editor,

https://youtu.be/PaQ09OOIpeg

DazTheGas

76
Mach4 Videos / ZeroBrane Tip - Debug Environment
« on: July 14, 2018, 10:17:01 AM »
Heres a handy liitle way to include all functions and modules that your gui uses, in the ZeroBrane Editor

https://youtu.be/_0WhzbFvoAM

DazTheGas

78
Mach4 Videos / Re: Mach4 Quicky #2 Keyboard Plugin
« on: July 07, 2018, 02:48:51 AM »
You would simply use different API commands such as mc.mcCntlCycleStart or mc.mcCntlEnable, in the docs directory you will find a help file called Mach4CoreAPI which contains all references to the LUA API.

DazTheGas

79
Mach4 Videos / Re: Creating an M6 Toolchange in Mach4 (Part 3)
« on: June 13, 2018, 05:24:00 PM »
Yep still in the pipeline, just have to get machine finished first ;-)

DazTheGas

80
Mach4 General Discussion / Re: Simple one line MDI required
« on: May 31, 2018, 02:08:43 PM »
It ignores anything you type and press enter if the previous command isn't complete which is fine


I have given you the bare min to get you started, consider adding to the code things like if the controller state is not idle disable the ability to execute another command, as for clearing any control of txt you can use the scr. api commands to do this.

DazTheGas