Posted: 30 Aug 2011, 23:00
I guys,
I'm trying to get better in the art of scripting. I have this problem I do not understand...

On this simple patch, when the "switch" change from 0 to 1, "data out" change from 0 to 1 but not the Toggle... Here's the script. Thanks
//////////////////////////
// Changement de nom
/////////////////////////
// parameters declaration
Var InA : tParameter;
Var OutA : tParameter;
// initialisation : create parameters
procedure init;
begin
InA := Createparam('Entrée', ptSwitch);
SetIsOutput(InA, False);
OutA := Createparam('Sortie', PtButton);
SetIsInput(OutA, False);
end;
//////////////////////////////
// main proc
//////////////////////////////
Procedure Process;
begin
If Getvalue (InA)= 1 then SetValue (OutA,1);
If Getvalue (InA)= 0 then SetValue (OutA,0);
end;
I'm trying to get better in the art of scripting. I have this problem I do not understand...

On this simple patch, when the "switch" change from 0 to 1, "data out" change from 0 to 1 but not the Toggle... Here's the script. Thanks
//////////////////////////
// Changement de nom
/////////////////////////
// parameters declaration
Var InA : tParameter;
Var OutA : tParameter;
// initialisation : create parameters
procedure init;
begin
InA := Createparam('Entrée', ptSwitch);
SetIsOutput(InA, False);
OutA := Createparam('Sortie', PtButton);
SetIsInput(OutA, False);
end;
//////////////////////////////
// main proc
//////////////////////////////
Procedure Process;
begin
If Getvalue (InA)= 1 then SetValue (OutA,1);
If Getvalue (InA)= 0 then SetValue (OutA,0);
end;