Как решить проблему со строкой myrect.place(myFile);
with(app){
var myFile = new File;
myFrame=activeDocument.selection[0]
myrect=myFrame.rectangles.add();
myFile=File.openDialog()
myrect.contentType = ContentType.unassigned;
myrect.place(myFile);
myrect.fit(FitOptions.frameToContent);
myrect.strokeWeight=0;
myAnch=myrect.anchoredObjectSettings
myAnch.anchorXoffset=11.339
myAnch.anchorYoffset=myrect.geometricBounds[2]-myrect.geometricBounds[0]
myAnch.anchoredPosition=AnchorPosition.anchored
myAnch.horizontalReferencePoint=AnchoredRelativeTo.anchorLocation
myAnch.verticalReferencePoint=VerticallyRelativeTo.capheight
myAnch.pinPosition=true
myAnch.spineRelative=false;
}
with(app){
var myFile = new File;
myFrame=activeDocument.selection[0]
myrect=myFrame.rectangles.add();
myFile=File.openDialog()
myrect.contentType = ContentType.unassigned;
myrect.place(myFile);
myrect.fit(FitOptions.frameToContent);
myrect.strokeWeight=0;
myAnch=myrect.anchoredObjectSettings
myAnch.anchorXoffset=11.339
myAnch.anchorYoffset=myrect.geometricBounds[2]-myrect.geometricBounds[0]
myAnch.anchoredPosition=AnchorPosition.anchored
myAnch.horizontalReferencePoint=AnchoredRelativeTo.anchorLocation
myAnch.verticalReferencePoint=VerticallyRelativeTo.capheight
myAnch.pinPosition=true
myAnch.spineRelative=false;
}