function slctns() {
return sTT = stringIDToTypeID,
aHS = (aD = activeDocument).activeHistoryState,
(ref1 = new ActionReference()).putClass(sTT('path')),
(dsc = new ActionDescriptor()).putReference(sTT('null'), ref1),
(ref2 = new ActionReference()).putProperty(sTT('selectionClass'), sTT('selection')),
dsc.putReference(sTT('from'), ref2), dsc.putUnitDouble(sTT('tolerance'), sTT('pixelsUnit'), .5),
executeAction(sTT('make'), dsc), lngth = aD.pathItems[0].subPathItems.length, aD.activeHistoryState = aHS, lngth
}
!(slctns() - 1) && alert('Your Code')