6841
General Mach Discussion / Re: Read external input
« on: August 15, 2017, 03:28:05 AM »
Hi,
Ive already got an m110 so I called this m120 instead...
and it seems to work.
Craig
Ive already got an m110 so I called this m120 instead...
Code: [Select]
function m120();
local inst=mc.mcGetInstance();
local SigHandle=mc.mcSignalGetHandle(inst,mc.ISIG_INPUT1);
if SigHandle==0 then wx.wxMessageBox('Bad Handle') end;
SigState,rc=mc.mcSignalGetState(SigHandle);
if SigState==0 then
wx.wxMessageBox('SigState is false');
else
wx.wxMessageBox('SigState is true')
end
end
if mc.mcInEditor()==1 then
m120()
end
and it seems to work.
Craig