There is no problem to get/set the content of text layer. But here I want to get the content (copied from CNTRL+C command from notepad) present in the memory and set it to the text item.
I guess it's a little confussing. Let me put this in another way,
- Create a shape layer and select it
- Execute the following script,
var idcopyLayerCSS = stringIDToTypeID( "copyLayerCSS" );
var desc111 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref31 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref31.putEnumerated( idLyr, idOrdn, idTrgt );
desc111.putReference( idnull, ref31 );
executeAction( idcopyLayerCSS, desc111, DialogModes.NO );
After executing the script, the css data of the selected layer is stored in the memory.
Now my problem is to get the content of this css data.
How I am going to do this?