I have played some more I add this into the Auto Tool Setting Macro from the manual
function GetRegister(regname)
local rc;
local inst = mc.mcGetInstance();
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname));
return mc.mcRegGetValueString(hreg);
end
now the Get touch off parameters work but when it gets to the Check Probe part it fails it comes up with this
[string "C:\Mach4Hobby\Macros\m1005.mcs"]:48: wxLua: Expected a 'number' for parameter 2, but got a 'nil'.
Function called: 'mcSignalGetHandle(number, nil)'
01. mcSignalGetHandle(number, number, lightuserdata)
stack traceback:
[C]: in function 'mcSignalGetHandle'
[string "C:\Mach4Hobby\Macros\m1005.mcs"]:48: in function 'm1005'
[string "C:\Mach4Hobby\Macros\m1005.mcs"]:109: in main chunk
I am running it in sim I have defind a probe input