Number of objects in selection
This is one of things that I’m missing in InDesign! When you have selection, there is no way to see how many objects do you have selected! Even ‘Info Panel’ doesn’t show object count! But, there is easy way to achieve this with scripting. Of course you can use this in your script to loop through all selected objects for example.
var objSelected = app.selection; alert(objSelected.length);
So, objSelected is filled with objects from selection, and we just display Array length in second line.
If we just want to display how many objects are selected, we can do it like this:
So, it’s not big deal, it’s easy and fast!