311
Mach4 General Discussion / Re: Keyboard Inputs Enabled or Disabled Handle
« on: January 04, 2017, 03:46:56 PM »
If you just want to get the state you can use
code for the example in video is as posted, nothing more or less, well apart from missing local inst = mc.mcGetInstance() at the beginning.
DazTheGas
Code: [Select]
local inst = mc.mcGetInstance()
local hIo, rc = mc.mcIoGetHandle(inst, "Keyboard/Enable")
if (rc == 0) then
local KbdState = mc.mcIoGetState(hIo)
end
wx.wxMessageBox(tostring(KbdState)) -- 0 = Off, 1 = On Just a test to show returned code
code for the example in video is as posted, nothing more or less, well apart from missing local inst = mc.mcGetInstance() at the beginning.
DazTheGas