Trying to applescript smart objects instead of double click & edit psb file
Hi,
I am trying to place an image inside of a smart object by applescripting instead of double clicking the smart object & placing the image inside of the psb file & saving.
I found the following information on how to do this via javascript (interesting because it seems undocumented in Adobe literature)
My question before quoting it below is:
Does anyone know how to applescript the equivalent of the javascript below, or is their a way to call the javascript from applescript?
Any pointers in the right direction is greatly appreciated. This would save me a ton of time over the year.
Here is the method mentioned before, quoted as I found it (Thanks for taking a look*):
" The method to open the contents of a SmartObject for editing is an undocumented action, however you can discover it by using the ScriptListener plugin. You have set a couple of parameter values and then use the executeAction command. After your "if" statement, you'll want to make the SmartObject layer the active layer...
docRef.activeLayer = docRef.artLayers;then insert the following lines to open the layer's contents...
var idAction = stringIDToTypeID( "placedLayerEditContents" );Your script will open the SmartObject just as if you double-clicked its icon in the layer stack. The object's contents are opened as a temporary .psb file, and it then becomes the activeDocument for your script. You may take further actions upon it and then close it (saving changes) to return to your original document. "
var idDesc = new ActionDescriptor();
executeAction(idAction, idDesc, DialogModes.NO);
