I'll clarify...
(mc.mcCntlIsInCycle(inst) == 1) a file is running, ==0 would be not running right ?
if so, what is the call for the following ?
(mc.mc__________(inst) == 1) control is enabled, ==0 control is disabled
or is there one?
Russ
(mc.mcCntlIsInCycle(inst) == 1) a file is running, ==0 would be not running right ? -- Correct
Try this;
To use a button to toggle Enable and Disable
--put this in the Screen Load Script
a = 0 -- set a variable
--Place under a button
local inst = mc.mcGetInstance();
if (a == 0) then --look for the value of a
a = 1; --set the value of a
mc.mcCntlEnable(inst, 1); -- Enable
elseif (a == 1) then
a = 0;
mc.mcCntlEnable(inst, 0); --Disable
end
Nothings really broke, just needs to be understood, and new code written to do what you want.
Don't expect this to be something your going to learn overnight, Long learning curve
I think I saw the light bulb from here when you seen how to use the Enable property.
I struggle everyday with one thing or another. But I Ain't dead yet.
don't give up
Learn to use the History / Error display to view code when your debugging an issue
This is over kill but it gives you an idea of how to look before and after something you expect to happen or do
the history button shows you the output and you can see what works and whats not. Clear, Close and try it again
local inst = mc.mcGetInstance();
mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 1? = ' .. tostring(mc.mcCntlEnable));
mc.mcCntlSetLastError(inst, 'a1? = ' .. tostring(a));
if (mc.mcCntlEnable ~= 0 and a == 0) then
mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 2? = ' .. tostring(mc.mcCntlEnable));
mc.mcCntlSetLastError(inst, 'a2? = ' .. tostring(a));
a=1;
mc.mcCntlEnable(inst, 0);
mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 3? = ' .. tostring(mc.mcCntlEnable));
mc.mcCntlSetLastError(inst, 'a3? = ' .. tostring(a));
elseif (mc.mcCntlEnable ~= 0 and a == 1) then
mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 4? = ' .. tostring(mc.mcCntlEnable));
mc.mcCntlSetLastError(inst, 'a4? = ' .. tostring(a));
a=0;
mc.mcCntlEnable(inst, 1);
mc.mcCntlSetLastError(inst, 'mc.mcCntlEnable 5? = ' .. tostring(mc.mcCntlEnable));
mc.mcCntlSetLastError(inst, 'a5? = ' .. tostring(a));
end