procedure OkButtonClick(Sender: TObject);
var 
  i: integer;
  strtemp: string; 
begin 
  strtemp := '';
  for i := 0 to CheckListBox1.Items.Count - 1 do 
  begin 
    if (CheckListBox1.Checked[i]) then
    begin
      IF (strtemp = '') then 
        strtemp := strtemp + CheckListBox1.Items[i] + '=1'; 
      else   
        strtemp := strtemp + ',' + CheckListBox1.Items[i] + '=1';  
    end;   
  end;            
  SetVarContent('VARIABLE1', strtemp);
  CloseForm(0);
end;