Make sure extendscript is targeting photoshop, or add this to the top of your co: #target photoshop
you could also try to use this instead of merge visable: activeDocument.flatten() that should do the same as merging visable.
Make sure extendscript is targeting photoshop, or add this to the top of your co: #target photoshop
you could also try to use this instead of merge visable: activeDocument.flatten() that should do the same as merging visable.