DO12 - Set COLUMNSADD fails

Here you go (I just added the line containing "..deselect = false;" in the bottom):

v0.1 - Leos initial post here: Tutorial video: Column resizing & folder formats
v0.2 - fixed to work with spaces in column names (affects script columns)
v0.3 - no deselecting of items

function OnClick(clickData){
   var colParams = "";
   
   for(var e = new Enumerator(clickData.func.sourcetab.format.columns); !e.atEnd(); e.moveNext()){
      var col = e.item();
      if (!col.Autosize || col.Max != 0){
         if (colParams) colParams += ",";
         colParams += col.Name;
         colParams += "(!,a,0)"; // Keep position. Auto-size. No maximum.
      }
   }
   var cmd = "Set FORMAT=!folder";
   if (colParams) cmd = 'Set COLUMNSADD="'+colParams+'"';
   clickData.func.command.deselect = false;
   clickData.func.command.RunCommand(cmd);
}