Is there a way to get the index (number) of the current layer using AppleScript?
This is what I would like to do:
I have a document that might have multiple layers: "Image from Clipboard, Shape Layer, Bitmap Layer 3, Shape Layer, "
I might have multiple selections on one of the bitmap layers which is the current layer
I then want to scriptomatically:
- create new layer with selection
- go back to the layer I was on and deselect
- apply my filter (usually exposure down 0.6)
- jump back to the top layer
- do more stuff like add a further shape layer (e.g. arrows) on top
step 2 is what is tripping me up.
…and I see something teasingly close in Cocoascript: var layer = doc.layers();