How can I "Merge Visible" to a layer in a Photoshop script?
The activeDocument.mergeVisibleLayers(); command simply flattens the image to the Background layer. I am looking for a way to merge all layers to a new layer which stays on top of all other layers, like the Layer->Merge Visible (Ctrl+Shift+E) Photoshop command.…