I propose an alternate syntax for the scripting command LBSetSelected, where for the row parameter you can supply an array of rows to change their selected state.
LBSelected returns an array of rows which are currently selected, being able to provide this array into LBSetSelected immediately would be a handy addition, rather than having to iterate over the array deselecting each row given.
Currently
{ _ctrl LBSetSelected[ _x, false ]; }foreach LBSelected _ctrl;
Proposed
_ctrl LBSetSelected[ LBSeleted _ctrl, false ];
Maybe also allow -1 as the row to deselect/select all, similar to the way LBSetCurSel works for deselecting all.
//Select all rows _ctrl LBSetSelected[ -1, true ]; //Deselect all rows _ctrl LBSetSelected[ -1, false ];