Answered
Embed linked image by javascript
Hey guys im getting an error for using the action script listener for embed linked image.
Here's the error:

and here's the code I used:
EmbedImg();
function EmbedImg()
{
var idplacedLayerConvertToEmbedded = stringIDToTypeID( "placedLayerConvertToEmbedded" );
executeAction( idplacedLayerConvertToEmbedded, undefined, DialogModes.NO );
}
I tried to catch and ignore the error, but it only works on the first linked image. I have the latest version of photoshop.
try
{
EmbedImg();
} catch (ignored) {}
