But now I only want it to run IF a checkbox "run at startup" is checked.
Here's my parameter setup:
- Code: Select all
pinfos[0].id = 0;
pinfos[0].type = BOOLPARAM;
pinfos[0].ctrlType = GUICTRL_CHECKBOX;
STRCPY(pinfos[0].name, "Check At Startup:");
pinfos[0].linkable = 1;
pinfos[0].saveable = 1;
pinfos[0].paramInfo.pb.defaultValue = false;
pinfos[0].paramInfo.pb.isTrigger = false;
STRCPY is defined as strcpy_s under windows, and strcpy under OSX.
Now my problem is that when I do:
- Code: Select all
getParameterValue(0, CheckAtStart);
if (CheckAtStart == 1 ) {
inside init() it seems that CheckAtStart is always ==0 regardless of whether or not it's checked.
Here's my parameterUpdate()
- Code: Select all
Version4_8::parameterUpdate(long id){
if(id == 0)
getParameterValue(0, CheckAtStart);
if(id == 1)
getParameterValue(1, CheckNow);
}
Is it just that at the time of init we don't have the parameter values yet?
