The SetParameter() function allows you to programmatically set the value of a control from within your script.
Usage is similar to the GetParameter function, but you need to set an additional argument for the value that you want to set.
The first argument describes which parameter is accessed. This can be either an integer (index) or a string (parameter name).
The second argument is the value that you want to set (always a number).
Important: Using SetParameter and track automation for a parameter at the same time can lead to unexpected behavior.
Code use example
The example code creates a slider control and will reset the value of that slider to 0 each time the plug-in is reset.
function Reset(){ SetParameter('slider', 0);}var PluginParameters = [{name:'slider', type:'lin', defaultValue:0.5, numberOfSteps:100, minValue:0, maxValue:1}];