Best clean way to get number of selected layers within script.
So,
I'm looking for the best way to count the number of selected layers in a PS document.
I've been looking around and stumbled on this piece of code : https://graphicdesign.stackexchange.com/questions/104786/is-it-possible-to-count-the-number-of-layers-selected-in-photoshop
It does work, but it works by creating a new group before counting the layers, then undoing it all. This fires a "Mk " event. And since the script has an EventListenner looking out for "Mk " events, well... I get stuck in an endless loop...
Isn't there a simple and effective way to count the selected layers ? Actually... I just need to know if there's more than one selected...
Many thanks.
J.
