Hello Guest it is April 26, 2024, 05:22:59 AM

Author Topic: If output/input is off or onn  (Read 995 times)

0 Members and 1 Guest are viewing this topic.

If output/input is off or onn
« on: October 22, 2018, 01:23:26 PM »
Hello,

I'm trying to do something simple like, check if an output or input is active.

I'm use mach3 VB, and I'm not able to find the dynamics of the LUA.


This command dont work, why not?

local inst= mc.mcGetInstance()
local Output0 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
if (sig == Output0) then
   wx.wxMessageBox("Output on")
end


what is the trick??
Re: If output/input is off or onn
« Reply #1 on: October 22, 2018, 02:14:31 PM »
Hi,

local inst= mc.mcGetInstance()
local Output0Handle = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
local Output0=mc.mcSignalGetState(Output0Handle)
if (sig == Output0) then
   wx.wxMessageBox("Output on")
end


Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: If output/input is off or onn
« Reply #2 on: October 22, 2018, 05:05:54 PM »
Hi,
just looking at what I've posted and it wont work either...try this:

local inst= mc.mcGetInstance()
local Output0Handle = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
local Output0=mc.mcSignalGetState(Output0Handle)
if ( Output0~=0) then
   wx.wxMessageBox("Output on")
end

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'