Home
> InDesign Scripts > Number of objects in selection
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:
alert(app.selection.length);
So, it’s not big deal, it’s easy and fast!
Have fun! 😀
Categories: InDesign Scripts
InDesign CS4, InDesign CS5
Comments (0)
Trackbacks (1)
Leave a comment
Trackback
-
July 26, 2010 at 14:58Tweets that mention Number of objects in selection « InDesign Snippets -- Topsy.com