It is also a problem of netizens in the QQ Group. In fact, if it is only merged into a PSD, you can also find the. NET library. However, most of the libraries can only be read and cannot be written because of PSD authorization issues. In addition, to popularize Ole. However, this code is only available in CS6, and may be changed in other Photoshop versions.
FN combinetexturetopsd inputsourcearray inputsavepsdfile photoshopexit: true = (if inputsourcearray. count> 1 do (Global photoshopapplication = createoleobject "Photoshop. application "for tempfilename in inputsourcearray do (photoshopapplication. load tempfilename) for I = 2 to inputsourcearray. count do (photoshopapplication. activedocument = photoshopapplication. specified ents I photoshopapplication. activedocument. selection. selectall () photoshopapplication. activedocument. selection. copy () photoshopapplication. activedocument = photoshopapplication. documents 1 photoshopapplication. activedocument. paste () photoshopapplication. activedocument. saveas inputsavepsdfile/* earlier versions may be photoshopapplication. documents. length */while photoshopapplication. documents. count> 0 do photoshopapplication. activedocument. close 2 if photoshopexit = true do (photoshopapplication. quit () releaseoleobject photoshopapplication = undefined GC () combinetexturetopsd # ("D: \ test \ test1.png", "d :\\ test \ test2.png ") "D: \ test. PSD"