I was wondering if it's possible to get selected layers ? so not only the active layer. I would like to do a batch operation on selected layers.
Have a look at this thread..
If you are using xtools, there is
var selLayers = Stdlib.getSelectedLayers(app.activeDocument);
available in stdlib.js.
Retrieving data ...