1
Mach4 General Discussion / Event Script for Enable Button
« on: May 03, 2016, 04:18:34 PM »
I have an DSPMC that I'm trying to script a button that will toggle Enable.
Here is the code I am trying per the Mach4 Core API, but it fails to compile...any help would be appreciated:
I had also tried the following code from the Scripting Manual which gave an error about the second parameter, which is why I moved onto the API syntax:
Here is the code I am trying per the Mach4 Core API, but it fails to compile...any help would be appreciated:
Code: [Select]
-- Enable button
if (sig == mc.ISIG_INPUT4) and (state == 1) then
MINSTANCE mInst = 0;
int rc = mcCntlEnable(mInst, TRUE);
end
I had also tried the following code from the Scripting Manual which gave an error about the second parameter, which is why I moved onto the API syntax:
Code: [Select]
-- Enable button
if (sig == mc.ISIG_INPUT4) and (state == 1) then
local inst = mc.mcGetInstance()
mc.mcCntlEnable(inst)
end