I'm trying to create a new layer using the Layer > New > Layer Via Copy functionality... and I did scan the code using the Scripting Plug-in with this result:
var idCpTL = charIDToTypeID( "CpTL" );
executeAction( idCpTL, undefined, DialogModes.NO );
Then I did convert it to:
var application:com.adobe.photoshop.Application = Photoshop.app;
var idCpTL:Number = application.charIDToTypeID( "CpTL" );
application.executeAction( idCpTL, undefined, DialogModes.NO );
But this code raises this exception:
Error: NULL pointer was encountered
I've tried to change "undefined" for "null" or any other idea... but with no luck. What am I doing wrong here?
Thanks a lot!