thanks，my Email： email@example.com
If you install the scriptlistener plug-in ScriptListener.8li and replace the contents of a smart object layer you would see something like this recorded.
var idplacedLayerReplaceContents = stringIDToTypeID( "placedLayerReplaceContents" );
var desc14 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
desc14.putPath( idnull, new File( "E:\\My Files\\Pictures\\Portrait\\LO2G5037.CR2" ) ); <------------------ replace the hard coded file with a variable
executeAction( idplacedLayerReplaceContents, desc14, DialogModes.NO );
Thank you very much @Mr.JJMack, I will try to do that , Thank you for your help again !!