// save as autoopen.js and include in batch target optionss user functions file
function onTargetProcessed() {
 if (getValueInt(1)>0) { // if # of errors > 0
  if ($_JOB.openineditor.arrayLength()<50) {
   $_JOB.openineditor[]=getValueString(5);
  }
 }
}