Hi,
now you have a new register/registers and you can inspect/edit manually. Note all this and more is covered in the
Mach4 Scripting Manual chapter 4, in Mach4Hobby/Docs folder.
Note that section 4.4 of the manual is somewhat out of date. It used to be necessary to explicitly flush the contents of
a register to the .ini file and reload it at the start of a new session. This is no longer required. None the less it is still
useful to be able to send the contents of a register to the .ini file under programmatic control.
Per Chapter 4 the main APIs are:
ï‚· hreg = mc.mcRegGetHandle(inst, path)
ï‚· val = mc.mcRegGetValue(hreg)
ï‚· string = mc.mcRegGetValueString(hreg)
ï‚· mc.mcRegSetValue(hreg)
ï‚· mc.mcRegSetValueString(hreg)
Thus to retrieve the value of jewelHeightReg in my example:
local hreg=mc.mcRegGetHandle(inst,'iRegs0/jewelHeightReg')
local ValuejewelHeightReg=mc.mcRegGetValue(inst,hreg)
As so often is the case reading a variable in Lua is a two step process, the first step is to find the variables 'handle'
or current address. Note that as the Mach session progresses that location can change....don't be duped.....get the
handle THEN get the value.
Craig