I’m trying to save an .acv preset for the curves, but my script doesn’t work. I tried to capture the code with alchemist and then replace the “path” with a token but it doesn’t work . i noticed that the achemist code is the same for both save curves and load curves. this is my script:
async function importP(){
const fs = require(“uxp”).storage.localFileSystem;
const folderF= await fs.getFolder();
let acv=await folderF.createFile(‘curveM.acv’,{ overwrite: true } )
await acv.write(“‘’”)
var curve=await folderF.getEntry(‘curveM.acv’)
let token=await fs.createSessionToken(curve)
const result =await batchPlay(
[
{ "_obj": "set", "_target": [ { "_ref": "adjustmentLayer", "_enum": "ordinal", "_value": "targetEnum" } ], "to": { "_obj": "curves", "presetKind": { "_enum": "presetKindType", "_value": "presetKindUserDefined" }, "using": { "_path": token, "_kind": "local" } }, "_isCommand": true, "_options": { "dialogOptions": "dontDisplay" } }
],{
"synchronousExecution": true, "modalBehavior": "fail"
});
}