Your placeScaleFile function is a scriptlistener recording… I guess someone else provided this snippet then…
function saveAsPSB( filePath ) {
function cTID(s) { return app.charIDToTypeID(s); };
//function sTID(s) { return app.stringIDToTypeID(s); };
var desc7 = new ActionDescriptor();
var desc8 = new ActionDescriptor();
desc7.putObject( cTID('As '), cTID('Pht8'), desc8 );
desc7.putPath( cTID('In '), new File( filePath ) );
desc7.putBoolean( cTID('LwCs'), true );
executeAction( cTID('save'), desc7, DialogModes.NO );
};
... View more