20
« on: June 29, 2018, 03:02:00 PM »
mcp is a local version of the mcMasterModule which I load as a require.
N_ is a "section name" which is loaded from the ini file. and of course "SafeZ" is the key and 0.00 is the default.
What this is supposed todo is read a value from the ini file and then set a register with that value in the iRegs0 section
the iRegs0 is in the LoadRegister function from mcMasterModule.lua which is included with Mach4.
My issue's are that scr.GetProperty() doesn't appear to work from a macro even when I have the required module loaded via a require.
and that mc.mGetRegister() doesn't work as per the example file. Now this problem I had a answer for before and forgot about it when I asked this question before.
Registers can only be created from a plugin. It would be much handier if we could mc.mcSetRegister() and create registers from a plugin. But then I guess that's why they
have the pound variables. So basically if I want this to work, I need to create a plugin which creates the appropriate registers and then work from there..
this is in my m6() macro.
local ToolChangePosX = mcp.GetRegister("ToolChangePosX", 1)
--scr.GetProperty("droToolChangePosX", "Value"))
Since scr.GetProperty() doesn't work, I changed to a Register which doesn't work either. it looks like I will need to use a ini value and work from there.